當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Page\PageRenderer類代碼示例

本文整理匯總了PHP中TYPO3\CMS\Core\Page\PageRenderer的典型用法代碼示例。如果您正苦於以下問題:PHP PageRenderer類的具體用法?PHP PageRenderer怎麽用?PHP PageRenderer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PageRenderer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addJSCSS

 /**
  * wrapper function called by hook (\TYPO3\CMS\Core\Page\PageRenderer->render-preProcess)
  *
  * @param array $parameters : An array of available parameters
  * @param \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer : The parent object that triggered this hook
  *
  * @return void
  */
 public function addJSCSS($parameters, &$pageRenderer)
 {
     // Add javascript
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Themes/ThemesBackendTca');
     // Add css
     $filename = $pageRenderer->backPath . ExtensionManagementUtility::extRelPath('themes') . 'Resources/Public/Stylesheet/ThemesBackendTca.css';
     $pageRenderer->addCssFile($filename, 'stylesheet', 'screen');
 }
開發者ID:dkd,項目名稱:themes,代碼行數:16,代碼來源:PageRenderer.php

示例2: __construct

 /**
  * Construct
  */
 public function __construct()
 {
     $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
     $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
     $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
     $this->pageRenderer->loadJquery();
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/ElementBrowser');
     $this->initialize();
 }
開發者ID:rickymathew,項目名稱:TYPO3.CMS,代碼行數:12,代碼來源:AbstractElementBrowser.php

示例3: render

 /**
  * @param StandaloneView $view
  * @param PageRenderer $pageRenderer
  * @param LoginController $loginController
  * @throws \UnexpectedValueException
  */
 public function render(StandaloneView $view, PageRenderer $pageRenderer, LoginController $loginController)
 {
     GeneralUtility::makeInstance(ObjectManager::class)->get(Dispatcher::class)->dispatch(__CLASS__, self::SIGNAL_getPageRenderer, array($pageRenderer));
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/UserPassLogin');
     $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/UserPassLoginForm.html'));
     if (GeneralUtility::getIndpEnv('TYPO3_SSL')) {
         $view->assign('presetUsername', GeneralUtility::_GP('u'));
         $view->assign('presetPassword', GeneralUtility::_GP('p'));
     }
 }
開發者ID:rickymathew,項目名稱:TYPO3.CMS,代碼行數:16,代碼來源:UsernamePasswordLoginProvider.php

示例4: getPageRenderer

 /**
  * @param PageRenderer $pageRenderer
  */
 public function getPageRenderer(PageRenderer $pageRenderer)
 {
     $loginSecurityLevel = trim($GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel']) ?: 'normal';
     if ($loginSecurityLevel === 'rsa') {
         $javascriptPath = '../' . ExtensionManagementUtility::siteRelPath('rsaauth') . 'Resources/Public/JavaScript/';
         $files = array('jsbn/jsbn.js', 'jsbn/prng4.js', 'jsbn/rng.js', 'jsbn/rsa.js', 'jsbn/base64.js');
         foreach ($files as $file) {
             $pageRenderer->addJsFile($javascriptPath . $file);
         }
         $pageRenderer->loadRequireJsModule('TYPO3/CMS/Rsaauth/BackendLoginFormRsaEncryption');
     }
 }
開發者ID:plan2net,項目名稱:TYPO3.CMS,代碼行數:15,代碼來源:UsernamePasswordProviderSlot.php

示例5: getPageRenderer

 /**
  * Gets instance of PageRenderer
  *
  * @return 	PageRenderer
  */
 public function getPageRenderer()
 {
     if (!isset($this->pageRenderer)) {
         $this->pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
         $this->pageRenderer->setBackPath(TYPO3_mainDir);
     }
     return $this->pageRenderer;
 }
開發者ID:Mr-Robota,項目名稱:TYPO3.CMS,代碼行數:13,代碼來源:FrontendRteController.php

示例6: addJsFileToPageRenderer

 /**
  * Wrapper for t3lib_PageRenderer->addJsFile. Excludes $jsFile from concatenation on TYPO3 4.6+.
  *
  * @param string $jsFile
  * @return void
  */
 protected function addJsFileToPageRenderer($jsFile)
 {
     if (version_compare(TYPO3_version, '4.6', '>=')) {
         $this->pageRenderer->addJsFile($jsFile, 'text/javascript', true, false, '', true);
     } else {
         $this->pageRenderer->addJsFile($jsFile);
     }
 }
開發者ID:AOEpeople,項目名稱:scheduler_timeline,代碼行數:14,代碼來源:TimelineController.php

示例7: render

 /**
  * Render
  *
  * @param string $file
  */
 public function render($file = NULL)
 {
     if ($this->isCached()) {
         $this->pageRenderer->addCssFile($file, $this->arguments['rel'], $this->arguments['media'], $this->arguments['title'], $this->arguments['compress'], $this->arguments['forceOnTop'], $this->arguments['allWrap'], $this->arguments['excludeFromConcatenation']);
     } else {
         $GLOBALS['TSFE']->additionalHeaderData[md5($file)] = '<link rel="' . $this->arguments['rel'] . '" type="text/css" media="' . $this->arguments['media'] . '" href="' . $file . '" />';
     }
 }
開發者ID:moodley,項目名稱:site_base,代碼行數:13,代碼來源:IncludeCssViewHelper.php

示例8: render

 /**
  * Load RequireJS code.
  *
  * @return void
  * @api
  */
 public function render()
 {
     $content = $this->renderChildren();
     $this->pageRenderer->addJsInlineCode('vidi-inline', $content);
     $configuration['paths']['Fab/Vidi'] = '../typo3conf/ext/vidi/Resources/Public/JavaScript';
     $this->pageRenderer->addRequireJsConfiguration($configuration);
     $this->pageRenderer->loadRequireJsModule('Fab/Vidi/Vidi/Main');
 }
開發者ID:BergischMedia,項目名稱:vidi,代碼行數:14,代碼來源:RequireJsViewHelper.php

示例9: initializeAction

 /**
  * Initialize every action.
  */
 public function initializeAction()
 {
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:vidi/Resources/Private/Language/locallang.xlf');
     // Configure property mapping to retrieve the file object.
     if ($this->arguments->hasArgument('columns')) {
         /** @var \Fab\Vidi\TypeConverter\CsvToArrayConverter $typeConverter */
         $typeConverter = $this->objectManager->get('Fab\\Vidi\\TypeConverter\\CsvToArrayConverter');
         $propertyMappingConfiguration = $this->arguments->getArgument('columns')->getPropertyMappingConfiguration();
         $propertyMappingConfiguration->setTypeConverter($typeConverter);
     }
 }
開發者ID:BergischMedia,項目名稱:vidi,代碼行數:14,代碼來源:ContentController.php

示例10: initializeAction

 /**
  * Initializes the rendering action.
  *
  * Use this method to add all static assets.
  */
 public function initializeAction()
 {
     if (!$this->cache->has('brushes')) {
         return;
     }
     $themeCss = $this->resolveFilePathReference(sprintf(self::CSS_PATH . '/shCore%s.css', $this->settings['code_snippet']['theme']));
     $this->pageRenderer->addCssFile($themeCss);
     $coreJs = $this->resolveFilePathReference(self::JS_PATH . '/shCore.min.js');
     $this->pageRenderer->addJsFooterLibrary('codesnippet_core', $coreJs);
     $autoloaderJs = $this->resolveFilePathReference(self::JS_PATH . '/shAutoloader.min.js');
     $this->pageRenderer->addJsFooterLibrary('codesnippet_autoloader', $autoloaderJs);
 }
開發者ID:svenhartmann,項目名稱:vantomas,代碼行數:17,代碼來源:SyntaxHighlighterController.php

示例11: render

 /**
  * Load the assets (JavaScript, CSS) for this Vidi module.
  *
  * @return void
  * @api
  */
 public function render()
 {
     /** @var \Fab\Vidi\Module\ModuleLoader $moduleLoader */
     $moduleLoader = $this->objectManager->get('Fab\\Vidi\\Module\\ModuleLoader');
     foreach ($moduleLoader->getAdditionalStyleSheetFiles() as $addCssFile) {
         $fileNameAndPath = $this->resolvePath($addCssFile);
         $this->pageRenderer->addCssFile($fileNameAndPath);
     }
     foreach ($moduleLoader->getAdditionalJavaScriptFiles() as $addJsFile) {
         $fileNameAndPath = $this->resolvePath($addJsFile);
         $this->pageRenderer->addJsFile($fileNameAndPath);
     }
 }
開發者ID:BergischMedia,項目名稱:vidi,代碼行數:19,代碼來源:AdditionalAssetsViewHelper.php

示例12: loadLocalization

 /**
  * Reads locallang file into array (for possible include in header)
  *
  * @return void
  */
 protected function loadLocalization()
 {
     $wizardLabels = $GLOBALS['LANG']->includeLLFile('EXT:form/Resources/Private/Language/locallang_wizard.xlf', FALSE, TRUE);
     $controllerLabels = $GLOBALS['LANG']->includeLLFile('EXT:form/Resources/Private/Language/locallang_controller.xlf', FALSE, TRUE);
     \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($controllerLabels, $wizardLabels);
     $this->pageRenderer->addInlineLanguageLabelArray($controllerLabels['default']);
 }
開發者ID:khanhdeux,項目名稱:typo3test,代碼行數:12,代碼來源:WizardView.php

示例13: initializeAction

 /**
  * Add the needed JavaScript files for all actions
  */
 public function initializeAction()
 {
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:extensionmanager/Resources/Private/Language/locallang.xlf');
     if ($this->configurationUtility->getCurrentConfiguration('extensionmanager')['offlineMode']['value']) {
         $this->settings['offlineMode'] = true;
     }
 }
開發者ID:rickymathew,項目名稱:TYPO3.CMS,代碼行數:10,代碼來源:ListController.php

示例14: showAction

 /**
  * action show
  *
  * @param \Subugoe\Substaff\Domain\Model\Group $group
  */
 public function showAction(\Subugoe\Substaff\Domain\Model\Group $group)
 {
     $this->pageRenderer->setTitle($group->getTitle());
     // group's name should be shown as title
     $GLOBALS['TSFE']->page['title'] = $group->getTitle();
     $people = $this->personRepository->findGroupMembers($group);
     $projects = $this->projectRepository->findProjectsByGroups($group->getUid());
     if ($group->getParentGroup() === null) {
         $subGroups = $this->groupRepository->findByParentGroup($group->getUid());
         $this->view->assign('subGroups', $subGroups);
     }
     if ($this->settings['groupDetailTeaser']) {
         $this->view->assign('showTeaser', $this->settings['groupDetailTeaser'])->assign('teaserLength', $this->settings['groupDetailTeaserLength']);
     }
     $this->view->assign('group', $group)->assign('people', $people)->assign('projects', $projects);
 }
開發者ID:subugoe,項目名稱:substaff,代碼行數:21,代碼來源:GroupController.php

示例15: addJSInlineCode

 /**
  * Add JS inline code
  *
  * @param string $name
  * @param string $block
  * @param boolean $compress
  * @param boolean $forceOnTop
  * @param string $position
  */
 public function addJSInlineCode($name, $block, $compress = true, $forceOnTop = false, $position = 'footer')
 {
     if ($position === 'header') {
         $this->pageRenderer->addJsInlineCode($name, $block, $compress, $forceOnTop);
     } else {
         $this->pageRenderer->addJsFooterInlineCode($name, $block, $compress, $forceOnTop);
     }
 }
開發者ID:beyond-agentur,項目名稱:yag,代碼行數:17,代碼來源:HeaderInclusion.php


注:本文中的TYPO3\CMS\Core\Page\PageRenderer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。