本文整理汇总了PHP中TYPO3\CMS\Core\Page\PageRenderer::addInlineSettingArray方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRenderer::addInlineSettingArray方法的具体用法?PHP PageRenderer::addInlineSettingArray怎么用?PHP PageRenderer::addInlineSettingArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Page\PageRenderer
的用法示例。
在下文中一共展示了PageRenderer::addInlineSettingArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAddInlineSettingArrayMerged
/**
* test inline settings with array get merged
*/
public function testAddInlineSettingArrayMerged()
{
$expectedReturnValue = 'TYPO3.settings = {"myApp":{"myKey1":"myValue1","myKey2":"myValue2"}};';
$this->fixture->loadExtJS();
$this->fixture->addInlineSettingArray('myApp', array('myKey1' => 'myValue1'));
$this->fixture->addInlineSettingArray('myApp', array('myKey2' => 'myValue2'));
$this->fixture->enableMoveJsFromHeaderToFooter();
$out = $this->fixture->render(\TYPO3\CMS\Core\Page\PageRenderer::PART_FOOTER);
$this->assertContains($expectedReturnValue, $out);
}
示例2: 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');
}
示例3: editTask
//.........这里部分代码省略.........
if (count($this->submittedData) > 0) {
// If some data was already submitted, use it to override
// existing data
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($taskInfo, $this->submittedData);
}
// Get the extra fields to display for each task that needs some
$allAdditionalFields = array();
if ($process == 'add') {
foreach ($registeredClasses as $class => $registrationInfo) {
if (!empty($registrationInfo['provider'])) {
/** @var $providerObject \TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface */
$providerObject = GeneralUtility::getUserObj($registrationInfo['provider']);
if ($providerObject instanceof \TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface) {
$additionalFields = $providerObject->getAdditionalFields($taskInfo, NULL, $this);
$allAdditionalFields = array_merge($allAdditionalFields, array($class => $additionalFields));
}
}
}
} else {
if (!empty($registeredClasses[$taskInfo['class']]['provider'])) {
$providerObject = GeneralUtility::getUserObj($registeredClasses[$taskInfo['class']]['provider']);
if ($providerObject instanceof \TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface) {
$allAdditionalFields[$taskInfo['class']] = $providerObject->getAdditionalFields($taskInfo, $task, $this);
}
}
}
// Load necessary JavaScript
$this->pageRenderer->loadExtJS();
$this->pageRenderer->addJsFile(ExtensionManagementUtility::extRelPath('scheduler') . 'res/tx_scheduler_be.js');
$this->pageRenderer->addJsFile($this->backPath . 'sysext/backend/Resources/Public/JavaScript/tceforms.js');
$this->pageRenderer->addJsFile($this->backPath . 'js/extjs/ux/Ext.ux.DateTimePicker.js');
// Define settings for Date Picker
$typo3Settings = array('datePickerUSmode' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['USdateFormat'] ? 1 : 0, 'dateFormat' => array('j-n-Y', 'G:i j-n-Y'), 'dateFormatUS' => array('n-j-Y', 'G:i n-j-Y'));
$this->pageRenderer->addInlineSettingArray('', $typo3Settings);
// Define table layout for add/edit form
$tableLayout = array('table' => array('<table border="0" cellspacing="0" cellpadding="0" id="edit_form" class="typo3-usersettings">', '</table>'));
// Define a style for hiding
// Some fields will be hidden when the task is not recurring
$style = '';
if ($taskInfo['type'] == 1) {
$style = ' style="display: none"';
}
// Start rendering the add/edit form
$content .= '<input type="hidden" name="tx_scheduler[uid]" value="' . htmlspecialchars($this->submittedData['uid']) . '" />';
$content .= '<input type="hidden" name="previousCMD" value="' . htmlspecialchars($this->CMD) . '" />';
$table = array();
$tr = 0;
$defaultCell = array('<td class="td-input">', '</td>');
// Disable checkbox
$label = '<label for="task_disable">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:disable') . '</label>';
$table[$tr][] = BackendUtility::wrapInHelp($this->cshKey, 'task_disable', $label);
$table[$tr][] = '<input type="hidden" name="tx_scheduler[disable]" value="0" />
<input type="checkbox" name="tx_scheduler[disable]" value="1" id="task_disable"' . ($taskInfo['disable'] == 1 ? ' checked="checked"' : '') . ' />';
$tableLayout[$tr] = array('tr' => array('<tr id="task_disable_row">', '</tr>'), 'defCol' => $defaultCell, '0' => array('<td class="td-label">', '</td>'));
$tr++;
// Task class selector
$label = '<label for="task_class">' . $GLOBALS['LANG']->getLL('label.class') . '</label>';
$table[$tr][] = BackendUtility::wrapInHelp($this->cshKey, 'task_class', $label);
// On editing, don't allow changing of the task class, unless it was not valid
if ($this->submittedData['uid'] > 0 && !empty($taskInfo['class'])) {
$cell = $registeredClasses[$taskInfo['class']]['title'] . ' (' . $registeredClasses[$taskInfo['class']]['extension'] . ')';
$cell .= '<input type="hidden" name="tx_scheduler[class]" id="task_class" value="' . htmlspecialchars($taskInfo['class']) . '" />';
} else {
$cell = '<select name="tx_scheduler[class]" id="task_class" class="wide" onchange="actOnChangedTaskClass(this)">';
// Group registered classes by classname
$groupedClasses = array();
示例4: render
public function render()
{
$this->pageRenderer = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Page\\PageRenderer');
$baseUrl = '../' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('extension_builder');
$this->pageRenderer->disableCompressJavascript();
// SECTION: JAVASCRIPT FILES
// YUI Basis Files
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui/utilities/utilities.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui/resize/resize-min.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui/layout/layout-min.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui/container/container-min.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui/json/json-min.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui/button/button-min.js');
// YUI-RPC
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui-rpc.js');
// InputEx with wirable options
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/inputex.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/Field.js');
// extended fields for enabling unique ids
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/extended/ListField.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/extended/Group.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/util/inputex/WirableField-beta.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/Visus.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/StringField.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/Textarea.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/SelectField.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/EmailField.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/UrlField.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/CheckBox.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/InPlaceEdit.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/MenuField.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/js/fields/TypeField.js');
// WireIt
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/excanvas.js', 'text/javascript', TRUE, FALSE, '<!--[if IE]>|<![endif]-->');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/WireIt.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/CanvasElement.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/Wire.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/Terminal.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/util/DD.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/util/DDResize.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/Container.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/ImageContainer.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/Layer.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/util/inputex/FormContainer-beta.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/LayerMap.js');
$this->pageRenderer->addInlineSettingArray('extensionBuilder', array('baseUrl' => $baseUrl));
$this->setLocallangSettings();
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/js/WiringEditor.js');
// Extbase Modelling definition
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/extbaseModeling.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/layout.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/extensionProperties.js');
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/modules/modelObject.js');
// collapsible forms in relations
$this->pageRenderer->addJsFile($baseUrl . 'Resources/Public/jsDomainModeling/modules/extendedModelObject.js');
// SECTION: CSS Files
// YUI CSS
$this->pageRenderer->addCssFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui/reset-fonts-grids/reset-fonts-grids.css');
$this->pageRenderer->addCssFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/yui/assets/skins/sam/skin.css');
// InputEx CSS
$this->pageRenderer->addCssFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/lib/inputex/css/inputEx.css');
// WireIt CSS
$this->pageRenderer->addCssFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/css/WireIt.css');
$this->pageRenderer->addCssFile($baseUrl . 'Resources/Public/jsDomainModeling/wireit/css/WireItEditor.css');
// Custom CSS
$this->pageRenderer->addCssFile($baseUrl . 'Resources/Public/jsDomainModeling/extbaseModeling.css');
}