本文整理汇总了PHP中TYPO3\CMS\Core\Page\PageRenderer::addInlineLanguageLabelArray方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRenderer::addInlineLanguageLabelArray方法的具体用法?PHP PageRenderer::addInlineLanguageLabelArray怎么用?PHP PageRenderer::addInlineLanguageLabelArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Page\PageRenderer
的用法示例。
在下文中一共展示了PageRenderer::addInlineLanguageLabelArray方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initializeAction
/**
* Initializes the controller before invoking an action method.
*
* @return void
*/
protected function initializeAction()
{
// @todo Evaluate how the intval() call can be used with Extbase validators/filters
$this->pageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
$icons = array('language' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('flags-multiple'), 'integrity' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-information'), 'success' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-ok'), 'info' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-information'), 'warning' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-warning'), 'error' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-error'));
$this->pageRenderer->addInlineSetting('Workspaces', 'icons', $icons);
$this->pageRenderer->addInlineSetting('Workspaces', 'id', $this->pageId);
$this->pageRenderer->addInlineSetting('Workspaces', 'depth', $this->pageId === 0 ? 999 : 1);
$this->pageRenderer->addInlineSetting('Workspaces', 'language', $this->getLanguageSelection());
$this->pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('workspaces') . 'Resources/Public/StyleSheet/module.css');
$this->pageRenderer->addInlineLanguageLabelArray(array('title' => $GLOBALS['LANG']->getLL('title'), 'path' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.path'), 'table' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.table'), 'depth' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_perm.xlf:Depth'), 'depth_0' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_0'), 'depth_1' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_1'), 'depth_2' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_2'), 'depth_3' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_3'), 'depth_4' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_4'), 'depth_infi' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_infi')));
$this->pageRenderer->addInlineLanguageLabelFile('EXT:workspaces/Resources/Private/Language/locallang.xlf');
$this->assignExtensionSettings();
}
示例2: 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']);
}
示例3: testAddInlineLanguageLabelArrayMerged
/**
* test inline language label as array get merged
*/
public function testAddInlineLanguageLabelArrayMerged()
{
$expectedReturnValue = 'TYPO3.lang = {"myKey1":"myValue1","myKey2":"myValue2"}';
$this->fixture->loadExtJS();
$this->fixture->addInlineLanguageLabelArray(array('myKey1' => 'myValue1'));
$this->fixture->addInlineLanguageLabelArray(array('myKey2' => 'myValue2'));
$this->fixture->enableMoveJsFromHeaderToFooter();
$out = $this->fixture->render(\TYPO3\CMS\Core\Page\PageRenderer::PART_FOOTER);
$this->assertContains($expectedReturnValue, $out);
}
示例4: initializeAction
/**
* Initializes the controller before invoking an action method.
*
* @return void
*/
protected function initializeAction()
{
$this->pageId = (int) GeneralUtility::_GP('id');
$this->pageRenderer->addInlineLanguageLabelArray(array('title' => $this->languageService->getLL('title'), 'path' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.path'), 'table' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.table'), 'depth' => $this->languageService->sL('LLL:EXT:lang/locallang_mod_web_perm.xml:Depth'), 'depth_0' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'), 'depth_1' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_1'), 'depth_2' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_2'), 'depth_3' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_3'), 'depth_4' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_4'), 'depth_infi' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi')));
$this->pageRenderer->addInlineLanguageLabelFile('EXT:typo3_forum/Resources/Private/Language/locallang_mod.xml');
$this->pageRenderer->loadExtJS();
$this->pageRenderer->enableExtJSQuickTips();
$this->pageRenderer->addJsFile(ExtensionManagementUtility::extRelPath('lang') . 'res/js/be/typo3lang.js');
$this->pageRenderer->addJsFile($this->backPath . 'js/extjs/ux/Ext.ux.FitToParent.js');
$this->includeJavascriptFromPath('Resources/Public/Javascript/Backend/ExtJS/');
$this->includeJavascriptFromPath('Resources/Public/Javascript/Backend/ForumIndex/');
$this->includeCssFromPath('Resources/Public/Javascript/Backend/ExtJS/');
$this->pageRenderer->addCssFile(ExtensionManagementUtility::extRelPath('typo3_forum') . 'Resources/Public/Stylesheets/typo3_forum-backend.css');
}
示例5: loadHeaderData
/**
* Loads data in the HTML head section (e.g. JavaScript or stylesheet information).
*
* @return void
*/
protected function loadHeaderData()
{
// Load CSS Stylesheets:
$this->pageRenderer->addCssFile($this->relativePath . 'res/css/customExtJs.css');
// Load Ext JS:
$this->pageRenderer->loadExtJS();
$this->pageRenderer->enableExtJSQuickTips();
// Integrate dynamic JavaScript such as configuration or lables:
$this->pageRenderer->addInlineSettingArray('Recycler', $this->getJavaScriptConfiguration());
$this->pageRenderer->addInlineLanguageLabelArray($this->getJavaScriptLabels());
// Load Recycler JavaScript:
// Load Plugins
$uxPath = $this->doc->backpath . 'js/extjs/ux/';
$this->pageRenderer->addJsFile($uxPath . 'Ext.grid.RowExpander.js');
$this->pageRenderer->addJsFile($uxPath . 'Ext.app.SearchField.js');
$this->pageRenderer->addJsFile($uxPath . 'Ext.ux.FitToParent.js');
// Load main script
$this->pageRenderer->addJsFile($this->relativePath . 'res/js/t3_recycler.js');
}