本文整理汇总了PHP中TYPO3\CMS\Core\Page\PageRenderer::loadScriptaculous方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRenderer::loadScriptaculous方法的具体用法?PHP PageRenderer::loadScriptaculous怎么用?PHP PageRenderer::loadScriptaculous使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Page\PageRenderer
的用法示例。
在下文中一共展示了PageRenderer::loadScriptaculous方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*/
public function __construct()
{
// Set debug flag for BE development only
$this->debug = intval($GLOBALS['TYPO3_CONF_VARS']['BE']['debug']) === 1;
// Initializes the backend modules structure for use later.
$this->moduleLoader = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
$this->moduleLoader->load($GLOBALS['TBE_MODULES']);
$this->moduleMenu = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\ModuleMenuView');
$this->pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
$this->pageRenderer->loadScriptaculous('builder,effects,controls,dragdrop');
$this->pageRenderer->loadExtJS();
$this->pageRenderer->enableExtJSQuickTips();
$this->pageRenderer->addJsInlineCode('consoleOverrideWithDebugPanel', '//already done', FALSE);
$this->pageRenderer->addExtDirectCode();
// Add default BE javascript
$this->js = '';
$this->jsFiles = array('common' => 'js/common.js', 'locallang' => $this->getLocalLangFileName(), 'modernizr' => 'contrib/modernizr/modernizr.min.js', 'swfupload' => 'contrib/swfupload/swfupload.js', 'swfupload.swfobject' => 'contrib/swfupload/plugins/swfupload.swfobject.js', 'swfupload.cookies' => 'contrib/swfupload/plugins/swfupload.cookies.js', 'swfupload.queue' => 'contrib/swfupload/plugins/swfupload.queue.js', 'md5' => 'md5.js', 'toolbarmanager' => 'js/toolbarmanager.js', 'modulemenu' => 'js/modulemenu.js', 'iecompatibility' => 'js/iecompatibility.js', 'flashupload' => 'js/flashupload.js', 'evalfield' => '../t3lib/jsfunc.evalfield.js', 'flashmessages' => '../t3lib/js/extjs/ux/flashmessages.js', 'tabclosemenu' => '../t3lib/js/extjs/ux/ext.ux.tabclosemenu.js', 'notifications' => '../t3lib/js/extjs/notifications.js', 'backend' => 'js/backend.js', 'loginrefresh' => 'js/loginrefresh.js', 'debugPanel' => 'js/extjs/debugPanel.js', 'viewport' => 'js/extjs/viewport.js', 'iframepanel' => 'js/extjs/iframepanel.js', 'backendcontentiframe' => 'js/extjs/backendcontentiframe.js', 'modulepanel' => 'js/extjs/modulepanel.js', 'viewportConfiguration' => 'js/extjs/viewportConfiguration.js', 'util' => '../t3lib/js/extjs/util.js');
if ($this->debug) {
unset($this->jsFiles['loginrefresh']);
}
// Add default BE css
$this->css = '';
$this->cssFiles = array();
$this->toolbarItems = array();
$this->initializeCoreToolbarItems();
$this->menuWidth = $this->menuWidthDefault;
if (isset($GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']) && (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'] != (int) $this->menuWidth) {
$this->menuWidth = (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'];
}
$this->executeHook('constructPostProcess');
}
示例2: __construct
/**
* Constructor
*/
public function __construct()
{
// Set debug flag for BE development only
$this->debug = (int) $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1;
// Initializes the backend modules structure for use later.
$this->moduleLoader = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
$this->moduleLoader->load($GLOBALS['TBE_MODULES']);
$this->pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
$this->pageRenderer->loadScriptaculous('builder,effects,controls,dragdrop');
$this->pageRenderer->loadExtJS();
$this->pageRenderer->loadJquery(NULL, NULL, \TYPO3\CMS\Core\Page\PageRenderer::JQUERY_NAMESPACE_DEFAULT_NOCONFLICT);
$this->pageRenderer->enableExtJSQuickTips();
$this->pageRenderer->addJsInlineCode('consoleOverrideWithDebugPanel', '//already done', FALSE);
$this->pageRenderer->addExtDirectCode();
// Add default BE javascript
$this->js = '';
$this->jsFiles = array('common' => 'sysext/backend/Resources/Public/JavaScript/common.js', 'locallang' => $this->getLocalLangFileName(), 'modernizr' => 'contrib/modernizr/modernizr.min.js', 'md5' => 'sysext/backend/Resources/Public/JavaScript/md5.js', 'toolbarmanager' => 'sysext/backend/Resources/Public/JavaScript/toolbarmanager.js', 'modulemenu' => 'sysext/backend/Resources/Public/JavaScript/modulemenu.js', 'evalfield' => 'sysext/backend/Resources/Public/JavaScript/jsfunc.evalfield.js', 'flashmessages' => 'sysext/backend/Resources/Public/JavaScript/flashmessages.js', 'tabclosemenu' => 'js/extjs/ux/ext.ux.tabclosemenu.js', 'notifications' => 'sysext/backend/Resources/Public/JavaScript/notifications.js', 'backend' => 'sysext/backend/Resources/Public/JavaScript/backend.js', 'loginrefresh' => 'sysext/backend/Resources/Public/JavaScript/loginrefresh.js', 'debugPanel' => 'js/extjs/debugPanel.js', 'viewport' => 'js/extjs/viewport.js', 'iframepanel' => 'sysext/backend/Resources/Public/JavaScript/iframepanel.js', 'backendcontentiframe' => 'js/extjs/backendcontentiframe.js', 'modulepanel' => 'js/extjs/modulepanel.js', 'viewportConfiguration' => 'js/extjs/viewportConfiguration.js', 'util' => 'sysext/backend/Resources/Public/JavaScript/util.js');
if ($this->debug) {
unset($this->jsFiles['loginrefresh']);
}
// Add default BE css
$this->pageRenderer->addCssLibrary('contrib/normalize/normalize.css', 'stylesheet', 'all', '', TRUE, TRUE);
$this->css = '';
$this->cssFiles = array();
$this->toolbarItems = array();
$this->initializeCoreToolbarItems();
$this->menuWidth = $this->menuWidthDefault;
if (isset($GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']) && (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'] != (int) $this->menuWidth) {
$this->menuWidth = (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'];
}
$this->executeHook('constructPostProcess');
}
示例3: isScriptaculousNotLoadedCompressedIfCompressionIsNotConfigured
/**
* Tests whether scriptaculous is correctly loaded, but without compression
* if no compression is configured.
*
* @test
*/
public function isScriptaculousNotLoadedCompressedIfCompressionIsNotConfigured()
{
$_SERVER['HTTP_ACCEPT_ENCODING'] = 'gzip,deflate';
$GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'] = '';
$this->fixture->loadScriptaculous('slider,controls');
$this->fixture->enableCompressJavascript();
$out = $this->fixture->render();
$this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/scriptaculous-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
$this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/effects-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
$this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/controls-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
$this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/slider-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
}