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


PHP PageRenderer::addJsFooterLibrary方法代碼示例

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


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

示例1: 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

示例2: testAddJsFooterLibrary

 /**
  * test add JS footer library file
  */
 public function testAddJsFooterLibrary()
 {
     $expectedRegExp = '#<script src="fileadmin/test\\.(js|\\d+\\.js|js\\?\\d+)" type="text/javascript"></script>#';
     $this->fixture->addJsFooterLibrary('test', 'fileadmin/test.js');
     $out = $this->fixture->render(\TYPO3\CMS\Core\Page\PageRenderer::PART_FOOTER);
     $this->assertRegExp($expectedRegExp, $out);
 }
開發者ID:nicksergio,項目名稱:TYPO3v4-Core,代碼行數:10,代碼來源:PageRendererTest.php

示例3: render

 /**
  * Render the URI to the resource. The filename is used from child content.
  *
  * @param string $file The relative path of the resource (relative to Public resource directory of the extension).
  */
 public function render($file = NULL)
 {
     if (!$this->arguments['extensionName']) {
         $this->arguments['extensionName'] = $this->controllerContext->getRequest()->getControllerExtensionName();
     }
     $uri = 'EXT:' . GeneralUtility::camelCaseToLowerCaseUnderscored($this->arguments['extensionName']) . $this->getResourcesPathAndFilename($file);
     $uri = GeneralUtility::getFileAbsFileName($uri);
     $uri = substr($uri, strlen(PATH_site));
     switch ($this->arguments['where']) {
         case 'footer':
             $this->pageRenderer->addJsFooterFile($uri, $this->arguments['type'], $this->arguments['compress'], $this->arguments['forceOnTop'], $this->arguments['allWrap'], $this->arguments['excludeFromConcatenation']);
             break;
         case 'footerLibs':
             $this->pageRenderer->addJsFooterLibrary($this->arguments['key'], $uri, $this->arguments['type'], $this->arguments['compress'], $this->arguments['forceOnTop'], $this->arguments['allWrap'], $this->arguments['excludeFromConcatenation']);
             break;
         default:
             $this->pageRenderer->addJsFile($uri, $this->arguments['type'], $this->arguments['compress'], $this->arguments['forceOnTop'], $this->arguments['allWrap'], $this->arguments['excludeFromConcatenation']);
             break;
     }
 }
開發者ID:electricretina,項目名稱:cicbase,代碼行數:25,代碼來源:IncludeJavascriptViewHelper.php


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