当前位置: 首页>>代码示例>>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;未经允许,请勿转载。