本文整理汇总了PHP中TYPO3\CMS\Extbase\Utility\ExtensionUtility类的典型用法代码示例。如果您正苦于以下问题:PHP ExtensionUtility类的具体用法?PHP ExtensionUtility怎么用?PHP ExtensionUtility使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ExtensionUtility类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sentry_register
/**
* Registers exception handler to the Sentry.
*
* @return void
*/
function sentry_register()
{
$extConf = @unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['sentry']);
if (is_array($extConf) && isset($extConf['sentryDSN'])) {
// Register Raven autoloader
$ravenPhpAutoloaderPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('sentry', 'lib/raven-php/lib/Raven/Autoloader.php');
/** @noinspection PhpIncludeInspection */
require_once $ravenPhpAutoloaderPath;
Raven_Autoloader::register();
// Set error handler
$GLOBALS['SENTRY_CLIENT'] = new Raven_Client($extConf['sentryDSN']);
$ravenErrorHandler = new Raven_ErrorHandler($GLOBALS['SENTRY_CLIENT']);
$errorMask = E_ALL & ~(E_DEPRECATED | E_NOTICE | E_STRICT);
// Register handlers in case if we do not have to report to TYPO3. Otherwise we need to register those handlers first!
if (!$extConf['passErrorsToTypo3']) {
$ravenErrorHandler->registerErrorHandler(FALSE, $errorMask);
$ravenErrorHandler->registerExceptionHandler(FALSE);
}
// Make sure that TYPO3 does not override our handler
\DmitryDulepov\Sentry\ErrorHandlers\SentryErrorHandler::initialize($ravenErrorHandler, $errorMask);
\DmitryDulepov\Sentry\ErrorHandlers\SentryExceptionHandler::initialize($ravenErrorHandler);
// TYPO3 7.0
\DmitryDulepov\Sentry\ErrorHandlers\SentryExceptionHandlerFrontend::initialize($ravenErrorHandler);
// Register test plugin
if (is_array($extConf) && isset($extConf['enableTestPlugin']) && $extConf['enableTestPlugin']) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('DmitryDulepov.sentry', 'ErrorHandlerTest', array('ErrorHandlerTest' => 'index,phpWarning,phpError,phpException'), array('ErrorHandlerTest' => 'index,phpWarning,phpError,phpException'));
}
unset($extConf);
// Fix TYPO3 7.0 hard-coded FE exception handler
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Frontend\\ContentObject\\Exception\\ProductionExceptionHandler'] = array('className' => 'DmitryDulepov\\Sentry\\ErrorHandlers\\SentryExceptionHandlerFrontend');
}
}
示例2: registerPlugin
/**
* @param $pluginName
* @param $pluginTitle
* @param null $flexFormClass
*/
protected static function registerPlugin($pluginName, $pluginTitle, $flexFormClass = null)
{
ExtensionUtility::registerPlugin('BERGWERK.' . self::$_extKey, $pluginName, $pluginTitle);
if (empty($flexFormClass)) {
return;
}
/** @var FlexForm $flexFormInstance */
$flexFormInstance = new $flexFormClass();
if (!$flexFormInstance instanceof FlexForm) {
return;
}
$flexForm = $flexFormInstance->render();
$pluginSignature = strtolower(GeneralUtility::underscoredToUpperCamelCase(self::$_extKey)) . '_' . strtolower($pluginName);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, $flexForm);
}
示例3: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('FluidTYPO3.Fluidcontent', 'Content', array('Content' => 'render'), array(), \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT);
\FluidTYPO3\Flux\Core::registerConfigurationProvider('FluidTYPO3\\Fluidcontent\\Provider\\ContentProvider');
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook']['fluidcontent'] = 'FluidTYPO3\\Fluidcontent\\Hooks\\WizardItemsHookSubscriber';
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['fluidcontent'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['fluidcontent'] = array('groups' => array('system'));
}
示例4: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
if (TYPO3_MODE == 'BE') {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('Sng.' . $_EXTKEY, 'txtypo3profilerM1', '', '', array(), array('access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.gif', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:typo3profilertitle'));
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('Sng.' . $_EXTKEY, 'txtypo3profilerM1', 'mod1', '', array('Page' => 'index,show,flush'), array('access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/page.gif', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:modpage'));
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('Sng.' . $_EXTKEY, 'txtypo3profilerM1', 'mod2', '', array('Sql' => 'index,show,flush'), array('access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/sql.gif', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:modsql'));
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', $_EXTKEY);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:typo3profiler/Configuration/TypoScript/setup.txt">');
}
示例5: die
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// TODO change to a constant, so that it can't get manipulated
$GLOBALS['PATH_solr'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('solr');
$GLOBALS['PATHrel_solr'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('solr');
# ----- # ----- # ----- # ----- # ----- # ----- # ----- # ----- # ----- #
// add search plugin to content element wizard
if (TYPO3_MODE == 'BE') {
$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['Tx_Solr_Backend_ContentElementWizardIconProvider'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Classes/Backend/ContentElementWizardIconProvider.php';
}
# ----- # ----- # ----- # ----- # ----- # ----- # ----- # ----- # ----- #
$iconPath = $GLOBALS['PATHrel_solr'] . 'Resources/Public/Images/Icons/';
\TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons(array('ModuleOverview' => $iconPath . 'Search.png', 'ModuleIndexQueue' => $iconPath . 'IndexQueue.png', 'ModuleIndexMaintenance' => $iconPath . 'IndexMaintenance.png', 'ModuleIndexFields' => $iconPath . 'IndexFields.png', 'ModuleSynonyms' => $iconPath . 'Synonyms.png', 'InitSolrConnections' => $iconPath . 'InitSolrConnections.png'), $_EXTKEY);
if (TYPO3_MODE == 'BE') {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'tools', 'administration', '', array('Administration' => 'index,setSite,setCore'), array('access' => 'admin', 'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/Icons/ModuleAdministration.png', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/ModuleAdministration.xlf'));
ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'Overview', array('index'));
ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'IndexQueue', array('index,initializeIndexQueue,resetLogErrors,clearIndexQueue'));
ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'IndexMaintenance', array('index,cleanUpIndex,emptyIndex,reloadIndexConfiguration'));
ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'IndexFields', array('index'));
ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'Synonyms', array('index,addSynonyms,deleteSynonyms'));
// registering reports
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['solr'] = array('Tx_Solr_Report_SchemaStatus', 'Tx_Solr_Report_SolrConfigStatus', 'Tx_Solr_Report_SolrConfigurationStatus', 'Tx_Solr_Report_SolrStatus', 'Tx_Solr_Report_SolrVersionStatus', 'Tx_Solr_Report_AccessFilterPluginInstalledStatus', 'Tx_Solr_Report_AllowUrlFOpenStatus', 'Tx_Solr_Report_FilterVarStatus');
// Index Inspector
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_info', 'Tx_Solr_ModIndex_IndexInspector', $GLOBALS['PATH_solr'] . 'ModIndex/IndexInspector.php', 'LLL:EXT:solr/Resources/Private/Language/Backend.xml:module_indexinspector');
// register Clear Cache Menu hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions']['clearSolrConnectionCache'] = '&Tx_Solr_ConnectionManager';
// register Clear Cache Menu ajax call
$TYPO3_CONF_VARS['BE']['AJAX']['solr::clearSolrConnectionCache'] = array('callbackMethod' => 'Tx_Solr_ConnectionManager->updateConnections', 'csrfTokenCheck' => true);
// the order of registering the garbage collector and the record monitor is important!
// for certain scenarios items must be removed by GC first, and then be re-added to to Index Queue
示例6: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// Register frontend plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'pi1', 'Marksale');
// Add static TypoScript template
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Marksale');
示例7: defined
<?php
defined('TYPO3_MODE') or die;
if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
// Module Web->View
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('TYPO3.CMS.' . $_EXTKEY, 'web', 'view', 'after:layout', array('ViewModule' => 'show'), array('icon' => 'EXT:viewpage/Resources/Public/Icons/module-viewpage.png', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf', 'access' => 'user,group'));
}
示例8: array
<?php
/** @var string $_EXTKEY */
$loader = array('SmartObjects', 'ExtensionTypoScriptSetup', 'ContextSensitiveHelps', 'FlexForms', 'StaticTyposcript', 'ExtensionId');
\HDNET\Autoloader\Loader::extTables('HDNET', 'faq', $loader);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Faq', 'FAQ');
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'FaqTeaser', 'FAQ Teaser');
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'FaqEnter', 'FAQ Eingabe');
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][$_EXTKEY]['0'] = 'LLL:EXT:faq/Resources/Private/Language/locallang.xml:sysfolder';
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][$_EXTKEY]['1'] = $_EXTKEY;
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', 'contains-faq', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/QuestionFolder.png');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
mod {
wizards.newContentElement.wizardItems.plugins {
elements {
faq {
icon = EXT:faq/Resources/Public/Icons/Question.png
title = FAQ
description = Create FAQ Plugin to handle the FAQ output
tt_content_defValues {
CType = list
list_type = faq_faq
}
}
}
}
}
');
示例9: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// register plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'quickgooglemap', 'Quick Google Map');
// set locallang file
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_cbgooglemaps', 'EXT:cbgooglemaps/Resources/Private/Language/locallang_csh_tx_cbgooglemaps.xml');
// add static template configuration
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Quick Google Maps');
// set plugin signature
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_quickgooglemap';
// add some new fields by flexform definition
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
// define flexform file
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_quickgooglemap.xml');
// exclude some default backend fields, like: layout, select_key, pages and recursive
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'layout,select_key,pages,recursive';
示例10: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$extConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]);
$actionNotToCache = '';
if ($extConfiguration['ENABLECACHE'] == '0') {
$actionNotToCache = 'index';
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('PwTeaserTeam.' . $_EXTKEY, 'Pi1', array('Teaser' => 'index'), array('Teaser' => $actionNotToCache));
$rootLineFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $TYPO3_CONF_VARS['FE']['addRootLineFields'], TRUE);
$rootLineFields[] = 'sorting';
$TYPO3_CONF_VARS['FE']['addRootLineFields'] = implode(',', $rootLineFields);
示例11: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('DERHANSEN.' . $_EXTKEY, 'Pi1', array('Banner' => 'show,getBanners,click'), array('Banner' => 'getBanners,click'));
// Register cache 'sfbanners_cache'
if (!is_array($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['sfbanners_cache'])) {
$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['sfbanners_cache'] = array();
}
示例12: array
*
* This script is part of the TYPO3 project. The TYPO3 project is free
* software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation;
* either version 2 of the License, or (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('MaxServ.Parsedown', 'Markdown', 'LLL:EXT:parsedown/Resources/Private/Language/Tca.xlf:plugin.markdown');
$additionalColumns = array('tx_parsedown_content' => array('exclude' => 1, 'label' => 'LLL:EXT:parsedown/Resources/Private/Language/Tca.xlf:tt_content.tx_parsedown_content', 'config' => array('type' => 'text', 'cols' => '80', 'rows' => '15')), 'tx_parsedown_preview' => array('exclude' => 1, 'label' => 'LLL:EXT:parsedown/Resources/Private/Language/Tca.xlf:tt_content.tx_parsedown_preview', 'config' => array('type' => 'user', 'userFunc' => 'MaxServ\\Parsedown\\UserFunctions\\Tca->markdownPreview')));
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $additionalColumns, 1, 'after:bodytext');
$GLOBALS['TCA']['tt_content']['types']['parsedown_markdown']['showitem'] = '
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
tx_parsedown_content,
tx_parsedown_preview,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,
--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,
--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access,
--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended,
--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category, categories';
示例13: defined
<?php
defined('TYPO3_MODE') or die('Access denied.');
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('Helhum.' . $_EXTKEY, 'PiExample', array('Example' => 'index, hello, greet'), array('Example' => 'hello, greet'));
/**
* Register eID for example ajax action-call
*/
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['ajax_example'] = 'EXT:ajax_example/Resources/Public/Scripts/Php/EidRunner.php';
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['ajax_example_hello'] = 'EXT:ajax_example/Resources/Public/Scripts/Php/EidHelloWorld.php';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['typoscript_rendering']['renderClasses']['hello'] = 'Helhum\\AjaxExample\\Renderer\\HelloWorldRenderer';
示例14: call_user_func
<?php
if (!defined('TYPO3_MODE')) {
throw new \Exception('Access denied.');
}
call_user_func(function ($extensionKey) {
if (TYPO3_MODE === 'BE') {
// Registering module.
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('Romm.' . $extensionKey, 'tools', 'Administration', '', array('Administration' => 'index,new,submit,processCopy,help', 'Duplication' => 'ajaxProcessDuplication'), array('access' => 'user,group', 'icon' => 'EXT:' . $extensionKey . '/ext_icon.png', 'labels' => 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_sitefactory.xlf'));
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($extensionKey, 'Configuration/TypoScript/Default', 'Site Factory - Default settings');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($extensionKey, 'Configuration/TypoScript/FieldsExample', 'Site Factory - Fields example');
// Extending locallang files.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:' . $extensionKey . '/Resources/Private/Language/locallang.xlf'] = array('EXT:' . $extensionKey . '/Resources/Private/Language/FineUploader.xlf', 'EXT:' . $extensionKey . '/Resources/Private/Language/FieldsLocallang.xlf');
}, $_EXTKEY);
示例15: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('Rattazonk.' . $_EXTKEY, 'Display', array('Form' => 'show'), array('Form' => 'show'));