本文整理汇总了PHP中TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants方法的典型用法代码示例。如果您正苦于以下问题:PHP ExtensionManagementUtility::addTypoScriptConstants方法的具体用法?PHP ExtensionManagementUtility::addTypoScriptConstants怎么用?PHP ExtensionManagementUtility::addTypoScriptConstants使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Utility\ExtensionManagementUtility
的用法示例。
在下文中一共展示了ExtensionManagementUtility::addTypoScriptConstants方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// Auto load fluid_styled_content typoscript
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:fluid_styled_content/Configuration/TypoScript/Static/setup.txt">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:fluid_styled_content/Configuration/TypoScript/Static/constants.txt">');
// Auto load extension typoscript
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:website/Configuration/TypoScript/pageTSconfig.ts">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:website/Configuration/TypoScript/setup.txt">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:website/Configuration/TypoScript/constants.txt">');
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = 'USER_FUNCTION:' . \Featdd\Website\Hook\PageNotFoundHandler::class . '->handle';
示例2: exec
$userTSConfig = GeneralUtility::getUrl($userTSConfigAbsFileName);
$userTSConfig = str_replace('###PACKAGE_KEY###', $_EXTKEY, $userTSConfig);
ExtensionManagementUtility::addUserTSConfig($userTSConfig);
# Register constants to use package key and version in TS later
if (TYPO3_MODE === 'FE') {
$packageVersion = exec('git --git-dir="' . ExtensionManagementUtility::extPath($_EXTKEY) . '/.git" describe --tags --always --long');
$packageVersion .= ' (' . exec('git --git-dir="' . ExtensionManagementUtility::extPath($_EXTKEY) . '/.git" rev-parse --abbrev-ref HEAD') . ')';
} else {
$packageVersion = '(only available in FE mode)';
}
ExtensionManagementUtility::addTypoScriptConstants('plugin.templatebootstrap.packageKey=' . $_EXTKEY);
ExtensionManagementUtility::addTypoScriptConstants('plugin.templatebootstrap.packageVersion=' . $packageVersion);
$environment = $settings['environment'];
ExtensionManagementUtility::addTypoScriptConstants('plugin.templatebootstrap.environment=' . $environment);
# Do not change this. It is used to identify which templatebootstrap version this package is originally derived from.
ExtensionManagementUtility::addTypoScriptConstants('plugin.templatebootstrap.bootstrapPackageVersion=' . ExtensionManagementUtility::getExtensionVersion($_EXTKEY));
# Load constants & setup
ExtensionManagementUtility::addTypoScript($_EXTKEY, 'constants', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Resources/Private/TypoScript/constants.ts">', $_EXTKEY . '/Configuration/TypoScript/');
ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Resources/Private/TypoScript/setup.ts">', $_EXTKEY . '/Configuration/TypoScript/');
# Register extconf variable to use in scripts
# (such as the layout provider hook)
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['Staempfli/TemplateBootstrap']['PackageKey'] = $_EXTKEY;
/******************************
* Add mood image and background image
* to the page overlay field list.
* Inheritance (rootline
* functionality) will be implemented by
* the TSRootLineMedia class.
******************************/
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields'] .= ',tx_' . $_EXTKEY . '_moodimage,tx_' . $_EXTKEY . '_backgroundimage';
# Use signal 'afterExtensionConfigurationWrite' to handle post installation tasks
示例3: array
* Include TypoScript
*/
if (array_key_exists('autoTS', $_EXTCONF) && $_EXTCONF['autoTS'] === '1') {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:t3sbootstrap/Configuration/TypoScript/Bootstrap/setup.txt">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:t3sbootstrap/Configuration/TypoScript/Bootstrap/constants.txt">');
} else {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/Bootstrap', 'Bootstrap Components');
}
/***************
* Disable "new element button" for tx_gridelements_children
*/
$GLOBALS['TCA']['tt_content']['columns']['tx_gridelements_children']['config']['appearance']['levelLinksPosition'] = 'none';
/***************
* BackendLayoutDataProvider
*/
if (array_key_exists('backendLayouts', $_EXTCONF) && $_EXTCONF['backendLayouts'] === '1') {
if (array_key_exists('optionalContent', $_EXTCONF) && $_EXTCONF['optionalContent'] === '1') {
# with optional content on top and bottom
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider'][$_EXTKEY] = 'T3SBS\\T3sbootstrap\\Provider\\ExtendedBackendLayoutDataProvider';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('plugin.t3sbootstrap_configuration.general.optionalContent = 1');
} else {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider'][$_EXTKEY] = 'T3SBS\\T3sbootstrap\\Provider\\BackendLayoutDataProvider';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('plugin.t3sbootstrap_configuration.general.optionalContent = 0');
}
}
/**
* Include Backend Module
*/
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dyncss') && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dyncss_less') && TYPO3_MODE === 'BE') {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('T3SBS.' . $_EXTKEY, 'tools', 'm1', '', array('Less' => 'index,create,reset,copy'), array('access' => 'admin', 'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.gif', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf'));
}
示例4: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// Automatically include extension Typoscript
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/Typoscript/constants.ts">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/Typoscript/setup.ts">');
// Configure the faq individual category plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('Tev.' . $_EXTKEY, 'FaqCategory', ['Category' => 'show']);
示例5:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:t3sbootstrap/Resources/Private/Extensions/indexed_search/Setup.ts">', defaultContentRendering);
}
# if powermail is loaded
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('powermail')) {
# Setup
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:t3sbootstrap/Resources/Private/Extensions/Powermail/Main.ts">', defaultContentRendering);
}
# if dyncss & dyncss_less is loaded
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dyncss') && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dyncss_less')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('plugin.t3sbootstrap_configuration.general.dyncss = 1');
} else {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('plugin.t3sbootstrap_configuration.general.dyncss = 0');
}
# Path to the flags by version
if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) < 7001000) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('plugin.t3sbootstrap_configuration.general.flags = ../typo3/sysext/t3skin/images/flags/');
} else {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('plugin.t3sbootstrap_configuration.general.flags = ../typo3/sysext/core/Resources/Public/Icons/Flags/');
}
/***************
* Bootstrap table-classes
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass'][$_EXTKEY] = 'T3SBS\\T3sbootstrap\\Hooks\\T3libBefunc';
/***************
* Add RootLine Fields: keywords & description
*/
$rootlinefields =& $GLOBALS["TYPO3_CONF_VARS"]["FE"]["addRootLineFields"];
if ($rootlinefields != '') {
$rootlinefields .= ' , ';
}
$rootlinefields .= 'keywords,description';