<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'func', '', '', array('routeTarget' => \TYPO3\CMS\Func\Controller\PageFunctionsController::class . '::mainAction', 'access' => 'user,group', 'name' => 'web_func', 'icon' => 'EXT:func/Resources/Public/Icons/module-func.svg', 'labels' => 'LLL:EXT:lang/locallang_mod_web_func.xlf')); }
<?php if (!defined("TYPO3_MODE")) { die("Access denied."); } if (TYPO3_MODE == "BE") { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule("user", "txrsuserimpM1", "", \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . "mod1/"); }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { // Register report module additions $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['typo3'][] = \TYPO3\CMS\Install\Report\InstallStatusReport::class; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['security'][] = \TYPO3\CMS\Install\Report\SecurityStatusReport::class; // Only add the environment status report if not in CLI mode if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) { $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = \TYPO3\CMS\Install\Report\EnvironmentStatusReport::class; } \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('system', 'extinstall', '', '', array('routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::index', 'access' => 'admin', 'name' => 'system_extinstall', 'labels' => array('tabs_images' => array('tab' => 'EXT:install/Resources/Public/Icons/module-install.svg'), 'll_ref' => 'LLL:EXT:install/Resources/Private/Language/BackendModule.xlf'))); }
/** * @test * @dataProvider addModulePositionTestsDataProvider * @param $position * @param $existing * @param $expected */ public function addModuleCanAddModule($position, $existing, $expected) { $mainModule = 'foobar'; $subModule = 'newModule'; if ($existing) { $GLOBALS['TBE_MODULES'][$mainModule] = $existing; } ExtensionManagementUtility::addModule($mainModule, $subModule, $position); $this->assertTrue(isset($GLOBALS['TBE_MODULES'][$mainModule])); $this->assertEquals($expected, $GLOBALS['TBE_MODULES'][$mainModule]); }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('tools_install', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'install', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/'); $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['typo3'][] = 'TYPO3\\CMS\\Install\\Report\\InstallStatusReport'; }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('user', 'setup', 'after:task', '', array('routeTarget' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '::mainAction', 'access' => 'group,user', 'name' => 'user_setup', 'icon' => 'EXT:setup/Resources/Public/Icons/module-setup.svg', 'labels' => array('ll_ref' => 'LLL:EXT:setup/Resources/Private/Language/locallang_mod.xlf'))); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_user_setup', 'EXT:setup/Resources/Private/Language/locallang_csh_mod.xlf'); $GLOBALS['TYPO3_USER_SETTINGS'] = array('columns' => array('realName' => array('type' => 'text', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:beUser_realName', 'table' => 'be_users', 'csh' => 'beUser_realName'), 'email' => array('type' => 'email', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:beUser_email', 'table' => 'be_users', 'csh' => 'beUser_email'), 'emailMeAtLogin' => array('type' => 'check', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:emailMeAtLogin', 'csh' => 'emailMeAtLogin'), 'password' => array('type' => 'password', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:newPassword', 'table' => 'be_users', 'csh' => 'newPassword'), 'password2' => array('type' => 'password', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:newPasswordAgain', 'table' => 'be_users', 'csh' => 'newPasswordAgain'), 'passwordCurrent' => array('type' => 'password', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:passwordCurrent', 'table' => 'be_users', 'csh' => 'passwordCurrent'), 'avatar' => array('label' => 'LLL:EXT:lang/locallang_tca.xlf:be_users.avatar', 'type' => 'avatar', 'table' => 'be_users', 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']), 'lang' => array('type' => 'select', 'itemsProcFunc' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '->renderLanguageSelect', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:language', 'csh' => 'language'), 'startModule' => array('type' => 'select', 'itemsProcFunc' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '->renderStartModuleSelect', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:startModule', 'csh' => 'startModule'), 'thumbnailsByDefault' => array('type' => 'check', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:showThumbs', 'csh' => 'showThumbs'), 'titleLen' => array('type' => 'text', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:maxTitleLen', 'csh' => 'maxTitleLen'), 'edit_RTE' => array('type' => 'check', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:edit_RTE', 'csh' => 'edit_RTE'), 'edit_docModuleUpload' => array('type' => 'check', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:edit_docModuleUpload', 'csh' => 'edit_docModuleUpload'), 'showHiddenFilesAndFolders' => array('type' => 'check', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:showHiddenFilesAndFolders', 'csh' => 'showHiddenFilesAndFolders'), 'copyLevels' => array('type' => 'text', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:copyLevels', 'csh' => 'copyLevels'), 'recursiveDelete' => array('type' => 'check', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:recursiveDelete', 'csh' => 'recursiveDelete'), 'resetConfiguration' => array('type' => 'button', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfiguration', 'buttonlabel' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfigurationButton', 'csh' => 'reset', 'onClick' => 'if (confirm(\'%s\')) { document.getElementById(\'setValuesToDefault\').value = 1; this.form.submit(); }', 'onClickLabels' => array('LLL:EXT:setup/Resources/Private/Language/locallang.xlf:setToStandardQuestion')), 'resizeTextareas_Flexible' => array('type' => 'check', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resizeTextareas_Flexible', 'csh' => 'resizeTextareas_Flexible'), 'resizeTextareas_MaxHeight' => array('type' => 'text', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:flexibleTextareas_MaxHeight', 'csh' => 'flexibleTextareas_MaxHeight'), 'debugInWindow' => array('type' => 'check', 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:debugInWindow', 'access' => 'admin')), 'showitem' => '--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:personal_data,realName,email,emailMeAtLogin,avatar,lang, --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xml:passwordHeader,passwordCurrent,password,password2, --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:opening,startModule,thumbnailsByDefault,titleLen, --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:editFunctionsTab,edit_RTE,edit_docModuleUpload,showHiddenFilesAndFolders,resizeTextareas_Flexible,resizeTextareas_MaxHeight,copyLevels,recursiveDelete,resetConfiguration, --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:adminFunctions,debugInWindow'); }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('web_list', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'list', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/', array('script' => '_DISPATCH', 'access' => 'user,group', 'name' => 'web_list', 'labels' => array('tabs_images' => array('tab' => '../Resources/Public/Icons/module-list.png'), 'll_ref' => 'LLL:EXT:lang/locallang_mod_web_list.xlf'))); // Register element browser wizard \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('wizard_element_browser', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/ElementBrowserWizard/'); }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:indexed_search/locallang.php:mod_indexed_search', $_EXTKEY)); \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content'); $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY] = 'layout,select_key,pages'; // Registers the Extbase plugin to be listed in the Backend. if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('extbase')) { $extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY); \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Pi2', 'Indexed Search (experimental)'); $pluginSignature = strtolower($extensionName) . '_pi2'; $TCA['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'layout,select_key,pages,recursive'; } if (TYPO3_MODE == 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'isearch', 'after:log', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_info', 'TYPO3\\CMS\\IndexedSearch\\Controller\\IndexedPagesController', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'modfunc1/class.tx_indexedsearch_modfunc1.php', 'LLL:EXT:indexed_search/locallang.php:mod_indexed_search'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_info', 'TYPO3\\CMS\\IndexedSearch\\Controller\\IndexingStatisticsController', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'modfunc2/class.tx_indexedsearch_modfunc2.php', 'LLL:EXT:indexed_search/locallang.php:mod2_indexed_search'); } \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('index_config'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('index_config', 'EXT:indexed_search/locallang_csh_indexcfg.xml'); $TCA['index_config'] = array('ctrl' => array('title' => 'LLL:EXT:indexed_search/locallang_db.php:index_config', 'label' => 'title', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'type' => 'type', 'default_sortby' => 'ORDER BY crdate', 'enablecolumns' => array('disabled' => 'hidden', 'starttime' => 'starttime'), 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'tca.php', 'iconfile' => 'default.gif'), 'feInterface' => array('fe_admin_fieldList' => 'hidden, starttime, title, description, type, depth, table2index, alternative_source_pid, get_params, chashcalc, filepath, extensions'));
// abstract $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi_abstract'] = 'layout,select_key,pages'; $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi_abstract'] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY . '_pi_abstract', 'FILE:EXT:' . $_EXTKEY . '/pi_abstract/flexform_ds.xml'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:caretaker/locallang_db.xml:tt_content.list_type_pi_abstract', $_EXTKEY . '_pi_abstract'), 'list_type'); if (TYPO3_MODE == "BE") { $TBE_MODULES_EXT["xMOD_db_new_content_el"]["addElClasses"]["tx_caretaker_pi_abstract_wizicon"] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'pi_abstract/class.tx_caretaker_pi_abstract_wizicon.php'; } // register Extension TS templates \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'res/typoscript/plugin', 'Caretaker Plugin Template'); // register Extension TS templates \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'res/typoscript/page', 'Caretaker Page Template'); // Register Backend Modules if (TYPO3_MODE == "BE") { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule("txcaretakerNav", "", "", \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . "mod_nav/"); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule("txcaretakerNav", "txcaretakerOverview", "", \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . "mod_overview/"); $caretaker_modconf = NULL; if (isset($TBE_MODULES['file'])) { $caretaker_modconf = $TBE_MODULES['txcaretakerNav']; unset($TBE_MODULES['txcaretakerNav']); } // move module after 'file' $temp_TBE_MODULES = array(); foreach ($TBE_MODULES as $key => $value) { if ($key == 'file') { $temp_TBE_MODULES[$key] = $value; $temp_TBE_MODULES['txcaretakerNav'] = $caretaker_modconf; } else { $temp_TBE_MODULES[$key] = $value; } }
<?php defined('TYPO3_MODE') or die(); if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( 'file', 'list', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/', array( 'script' => '_DISPATCH', 'access' => 'user,group', 'name' => 'file_list', 'workspaces' => 'online,custom', 'labels' => array( 'tabs_images' => array( 'tab' => '../Resources/Public/Icons/module-filelist.png', ), 'll_ref' => 'LLL:EXT:lang/locallang_mod_file_list.xlf', ), ) ); }
/** * Registers an Extbase module (main or sub) to the backend interface. * FOR USE IN ext_tables.php FILES * * @param string $extensionName The extension name (in UpperCamelCase) or the extension key (in lower_underscore) * @param string $mainModuleName The main module key. So $main would be an index in the $TBE_MODULES array and $sub could be an element in the lists there. If $subModuleName is not set a blank $extensionName module is created * @param string $subModuleName The submodule key. * @param string $position This can be used to set the position of the $sub module within the list of existing submodules for the main module. $position has this syntax: [cmd]:[submodule-key]. cmd can be "after", "before" or "top" (or blank which is default). If "after"/"before" then submodule will be inserted after/before the existing submodule with [submodule-key] if found. If not found, the bottom of list. If "top" the module is inserted in the top of the submodule list. * @param array $controllerActions is an array of allowed combinations of controller and action stored in an array (controller name as key and a comma separated list of action names as value, the first controller and its first action is chosen as default) * @param array $moduleConfiguration The configuration options of the module (icon, locallang.xlf file) * @throws \InvalidArgumentException * @return void */ public static function registerModule($extensionName, $mainModuleName = '', $subModuleName = '', $position = '', array $controllerActions = [], array $moduleConfiguration = []) { self::checkExtensionNameFormat($extensionName); // Check if vendor name is prepended to extensionName in the format {vendorName}.{extensionName} $vendorName = null; if (false !== ($delimiterPosition = strrpos($extensionName, '.'))) { $vendorName = str_replace('.', '\\', substr($extensionName, 0, $delimiterPosition)); $extensionName = substr($extensionName, $delimiterPosition + 1); if (!empty($vendorName)) { self::checkVendorNameFormat($vendorName, $extensionName); } } $extensionName = str_replace(' ', '', ucwords(str_replace('_', ' ', $extensionName))); $defaultModuleConfiguration = ['access' => 'admin', 'icon' => 'EXT:extbase/Resources/Public/Icons/Extension.png', 'labels' => '']; if ($mainModuleName !== '' && !array_key_exists($mainModuleName, $GLOBALS['TBE_MODULES'])) { $mainModuleName = $extensionName . \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($mainModuleName); } else { $mainModuleName = $mainModuleName !== '' ? $mainModuleName : 'web'; } // add mandatory parameter to use new pagetree if ($mainModuleName === 'web') { $defaultModuleConfiguration['navigationComponentId'] = 'typo3-pagetree'; } \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($defaultModuleConfiguration, $moduleConfiguration); $moduleConfiguration = $defaultModuleConfiguration; $moduleSignature = $mainModuleName; if ($subModuleName !== '') { $subModuleName = $extensionName . \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($subModuleName); $moduleSignature .= '_' . $subModuleName; } $moduleConfiguration['name'] = $moduleSignature; if (null !== $vendorName) { $moduleConfiguration['vendorName'] = $vendorName; } $moduleConfiguration['extensionName'] = $extensionName; $moduleConfiguration['configureModuleFunction'] = [\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::class, 'configureModule']; $GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature] = $moduleConfiguration; if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature])) { $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature] = []; } foreach ($controllerActions as $controllerName => $actions) { $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature]['controllers'][$controllerName] = ['actions' => \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $actions)]; } \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule($mainModuleName, $subModuleName, $position); }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'ts', '', '', array('routeTarget' => \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class . '::mainAction', 'access' => 'admin', 'name' => 'web_ts', 'labels' => array('tabs_images' => array('tab' => 'EXT:tstemplate/Resources/Public/Icons/module-tstemplate.svg'), 'll_ref' => 'LLL:EXT:tstemplate/Resources/Private/Language/locallang_mod.xlf'))); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_ts', \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController::class, null, 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:constantEditor'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_ts', \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateInformationModuleFunctionController::class, null, 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:infoModify'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_ts', \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController::class, null, 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:objectBrowser'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_ts', \TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController::class, null, 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:templateAnalyzer'); }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('system', 'dbint', '', '', array('routeTarget' => \TYPO3\CMS\Lowlevel\View\DatabaseIntegrityView::class . '::mainAction', 'access' => 'admin', 'name' => 'system_dbint', 'workspaces' => 'online', 'icon' => 'EXT:lowlevel/Resources/Public/Icons/module-dbint.svg', 'labels' => array('ll_ref' => 'LLL:EXT:lowlevel/Resources/Private/Language/locallang_mod.xlf'))); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('system', 'config', '', '', array('routeTarget' => \TYPO3\CMS\Lowlevel\View\ConfigurationView::class . '::mainAction', 'access' => 'admin', 'name' => 'system_config', 'workspaces' => 'online', 'icon' => 'EXT:lowlevel/Resources/Public/Icons/module-config.svg', 'labels' => array('ll_ref' => 'LLL:EXT:lowlevel/Resources/Private/Language/locallang_mod_configuration.xlf'))); }
// Check from Vidi configuration what default module should be loaded. // Make sure the class exists to avoid a Runtime Error if (TYPO3_MODE == 'BE') { // Add content main module before 'user' if (!isset($GLOBALS['TBE_MODULES']['content'])) { // Position module "content" after module "user" manually. No API is available for that, it seems... $modules = []; foreach ($GLOBALS['TBE_MODULES'] as $key => $val) { if ($key == 'user') { $modules['content'] = ''; } $modules[$key] = $val; } $GLOBALS['TBE_MODULES'] = $modules; // Register "data management" module. \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('content', '', '', '', ['name' => 'content', 'access' => 'user,group', 'labels' => ['ll_ref' => 'LLL:EXT:vidi/Resources/Private/Language/content_module.xlf']]); } /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */ $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager'); /** @var \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility $configurationUtility */ $configurationUtility = $objectManager->get('TYPO3\\CMS\\Extensionmanager\\Utility\\ConfigurationUtility'); $configuration = $configurationUtility->getCurrentConfiguration('vidi'); $pids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $configuration['default_pid']['value'], TRUE); $defaultPid = array_shift($pids); $defaultPids = []; foreach ($pids as $dataTypeAndPid) { $parts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(':', $dataTypeAndPid); if (count($parts) === 2) { $defaultPids[$parts[0]] = $parts[1]; } }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('user', 'setup', 'after:task', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_user_setup', 'EXT:setup/locallang_csh_mod.xlf'); $GLOBALS['TYPO3_USER_SETTINGS'] = array('ctrl' => array('dividers2tabs' => 1), 'columns' => array('realName' => array('type' => 'text', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:beUser_realName', 'table' => 'be_users', 'csh' => 'beUser_realName'), 'email' => array('type' => 'text', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:beUser_email', 'table' => 'be_users', 'csh' => 'beUser_email'), 'emailMeAtLogin' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:emailMeAtLogin', 'csh' => 'emailMeAtLogin'), 'password' => array('type' => 'password', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:newPassword', 'table' => 'be_users', 'csh' => 'newPassword'), 'password2' => array('type' => 'password', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:newPasswordAgain', 'table' => 'be_users', 'csh' => 'newPasswordAgain'), 'lang' => array('type' => 'select', 'itemsProcFunc' => 'TYPO3\\CMS\\Setup\\Controller\\SetupModuleController->renderLanguageSelect', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:language', 'csh' => 'language'), 'startModule' => array('type' => 'select', 'itemsProcFunc' => 'TYPO3\\CMS\\Setup\\Controller\\SetupModuleController->renderStartModuleSelect', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:startModule', 'csh' => 'startModule'), 'thumbnailsByDefault' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:showThumbs', 'csh' => 'showThumbs'), 'titleLen' => array('type' => 'text', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:maxTitleLen', 'csh' => 'maxTitleLen'), 'edit_RTE' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:edit_RTE', 'csh' => 'edit_RTE'), 'edit_docModuleUpload' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:edit_docModuleUpload', 'csh' => 'edit_docModuleUpload'), 'showHiddenFilesAndFolders' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:showHiddenFilesAndFolders', 'csh' => 'showHiddenFilesAndFolders'), 'copyLevels' => array('type' => 'text', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:copyLevels', 'csh' => 'copyLevels'), 'recursiveDelete' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:recursiveDelete', 'csh' => 'recursiveDelete'), 'simulate' => array('type' => 'select', 'itemsProcFunc' => 'TYPO3\\CMS\\Setup\\Controller\\SetupModuleController->renderSimulateUserSelect', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:simulate', 'csh' => 'simuser'), 'resetConfiguration' => array('type' => 'button', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:resetConfiguration', 'buttonlabel' => 'LLL:EXT:setup/mod/locallang.xlf:resetConfigurationShort', 'csh' => 'reset', 'onClick' => 'if (confirm(\'%s\')) { document.getElementById(\'setValuesToDefault\').value = 1; this.form.submit(); }', 'onClickLabels' => array('LLL:EXT:setup/mod/locallang.xlf:setToStandardQuestion')), 'clearSessionVars' => array('type' => 'button', 'access' => 'admin', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:clearSessionVars', 'buttonlabel' => 'LLL:EXT:setup/mod/locallang.xlf:clearSessionVarsShort', 'csh' => 'reset', 'onClick' => 'if (confirm(\'%s\')) { document.getElementById(\'clearSessionVars\').value = 1; this.form.submit(); }', 'onClickLabels' => array('LLL:EXT:setup/mod/locallang.xlf:clearSessionVarsQuestion')), 'resizeTextareas' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:resizeTextareas', 'csh' => 'resizeTextareas'), 'resizeTextareas_Flexible' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:resizeTextareas_Flexible', 'csh' => 'resizeTextareas_Flexible'), 'resizeTextareas_MaxHeight' => array('type' => 'text', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:flexibleTextareas_MaxHeight', 'csh' => 'flexibleTextareas_MaxHeight'), 'debugInWindow' => array('type' => 'check', 'label' => 'LLL:EXT:setup/mod/locallang.xlf:debugInWindow', 'access' => 'admin')), 'showitem' => '--div--;LLL:EXT:setup/mod/locallang.xlf:personal_data,realName,email,emailMeAtLogin,password,password2,lang, --div--;LLL:EXT:setup/mod/locallang.xlf:opening,startModule,thumbnailsByDefault,titleLen, --div--;LLL:EXT:setup/mod/locallang.xlf:editFunctionsTab,edit_RTE,edit_docModuleUpload,showHiddenFilesAndFolders,resizeTextareas,resizeTextareas_Flexible,resizeTextareas_MaxHeight,copyLevels,recursiveDelete,resetConfiguration,clearSessionVars, --div--;LLL:EXT:setup/mod/locallang.xlf:adminFunctions,simulate,debugInWindow'); }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } if (TYPO3_MODE == 'BE') { /* Add the backend modules */ \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'txwecmapM1', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'txwecmapM2', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod2/'); /* Add the plugin to the New Content Element wizard */ $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_wecmap_pi1_wizicon'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'pi1/class.tx_wecmap_pi1_wizicon.php'; $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_wecmap_pi2_wizicon'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'pi2/class.tx_wecmap_pi2_wizicon.php'; $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_wecmap_pi3_wizicon'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'pi3/class.tx_wecmap_pi3_wizicon.php'; } /* Set up the tt_content fields for the two frontend plugins */ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi1'] = 'layout,select_key,pages,recursive'; $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi2'] = 'layout,select_key,pages,recursive'; $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi3'] = 'layout,select_key,pages,recursive'; $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi1'] = 'pi_flexform'; $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi2'] = 'pi_flexform'; $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi3'] = 'pi_flexform'; /* Adds the plugins and flexforms to the TCA */ \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:wec_map/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY . '_pi1'), 'list_type'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:wec_map/locallang_db.xml:tt_content.list_type_pi2', $_EXTKEY . '_pi2'), 'list_type'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:wec_map/locallang_db.xml:tt_content.list_type_pi3', $_EXTKEY . '_pi3'), 'list_type'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY . '_pi1', 'FILE:EXT:wec_map/pi1/flexform_ds.xml'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY . '_pi2', 'FILE:EXT:wec_map/pi2/flexform_ds.xml'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY . '_pi3', 'FILE:EXT:wec_map/pi3/flexform_ds.xml'); // register Ajax scripts \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('txwecmapM1::deleteAll', 'tx_wecmap_module1_ajax->ajaxDeleteAll'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('txwecmapM1::deleteSingle', 'tx_wecmap_module1_ajax->ajaxDeleteSingle');
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'list', '', '', array('routeTarget' => \TYPO3\CMS\Recordlist\RecordList::class . '::mainAction', 'access' => 'user,group', 'name' => 'web_list', 'icon' => 'EXT:recordlist/Resources/Public/Icons/module-list.svg', 'labels' => array('ll_ref' => 'LLL:EXT:lang/locallang_mod_web_list.xlf'))); // register element browsers $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['db'] = \TYPO3\CMS\Recordlist\Browser\DatabaseBrowser::class; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['file'] = \TYPO3\CMS\Recordlist\Browser\FileBrowser::class; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['folder'] = \TYPO3\CMS\Recordlist\Browser\FolderBrowser::class; // register default link handlers \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' TCEMAIN.linkHandler { page { handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\PageLinkHandler label = LLL:EXT:lang/locallang_browse_links.xlf:page } file { handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\FileLinkHandler label = LLL:EXT:lang/locallang_browse_links.xlf:file displayAfter = page scanAfter = page } folder { handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\FolderLinkHandler label = LLL:EXT:lang/locallang_browse_links.xlf:folder displayAfter = file scanAfter = file } url { handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\UrlLinkHandler label = LLL:EXT:lang/locallang_browse_links.xlf:extUrl
if (!defined('TYPO3_MODE')) { die('Access denied.'); } $extPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY); // Allow all calendar records on standard pages, in addition to SysFolders. \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_event'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_category'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_calendar'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_exception_event'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_exception_event_group'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_location'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_organizer'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_unknown_users'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_attendee'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_fe_user_event_monitor_mm'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_cal_event_deviation'); // Add Calendar Events to the "Insert Records" content element \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tx_cal_event'); // initalize 'context sensitive help' (csh) \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_cal_event', 'EXT:cal/Resources/Private/Help/locallang_csh_txcalevent.php'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_cal_calendar', 'EXT:cal/Resources/Private/Help/locallang_csh_txcalcal.php'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_cal_category', 'EXT:cal/Resources/Private/Help/locallang_csh_txcalcat.php'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_cal_exception_event', 'EXT:cal/Resources/Private/Help/locallang_csh_txcalexceptionevent.php'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_cal_exception_event_group', 'EXT:cal/Resources/Private/Help/locallang_csh_txcalexceptioneventgroup.php'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_cal_location', 'EXT:cal/Resources/Private/Help/locallang_csh_txcallocation.php'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_cal_organizer', 'EXT:cal/Resources/Private/Help/locallang_csh_txcalorganizer.php'); if (TYPO3_MODE == "BE") { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule("tools", "calrecurrencegenerator", "", $extPath . "Classes/Backend/Modul/"); $GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses']['TYPO3\\CMS\\Cal\\Backend\\CalWizIcon'] = $extPath . 'Classes/Backend/CalWizIcon.php'; }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'news', 'LLL:EXT:go_multilang/Resources/Private/Language/locallang_db.xlf:tx_gomultilang_domain_model_newsdata.title'); $TCA['tt_content']['types']['gomultilang_news']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xml:palette.general;general, newsdata'; Gosign\GoBackend\Wizard\NewContentElement::addPluginToWizard('gomultilang_news', array('title' => 'Multi Language', 'description' => 'this is a plugin for performing mutliple languages task in database for lerning purpose')); # #Register your module # \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('go_module', '', '', 'EXT:' . $_EXTKEY . '/Modules/', array('access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.gif', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xml')); \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('Gosign.' . $_EXTKEY, 'go_module', '', '', array()); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('go_module', 'EXT:' . $_EXTKEY . '/Modules/'); # #END Mudule # \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Multi Language'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_gomultilang_domain_model_newsdata', 'EXT:go_multilang/Resources/Private/Language/locallang_csh_tx_gomultilang_domain_model_newsdata.xlf'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_gomultilang_domain_model_newsdata');
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'info', '', '', array('routeTarget' => \TYPO3\CMS\Info\Controller\InfoModuleController::class . '::mainAction', 'access' => 'user,group', 'name' => 'web_info', 'icon' => 'EXT:info/Resources/Public/Icons/module-info.svg', 'labels' => 'LLL:EXT:lang/locallang_mod_web_info.xlf')); }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('file', 'list', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'); }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('system', 'dbint', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'dbint/', array('script' => '_DISPATCH', 'access' => 'admin', 'name' => 'system_dbint', 'workspaces' => 'online', 'labels' => array('tabs_images' => array('tab' => '../Resources/Public/Icons/module-dbint.png'), 'll_ref' => 'LLL:EXT:lowlevel/dbint/locallang_mod.xlf'))); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('system', 'config', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'config/', array('script' => '_DISPATCH', 'access' => 'admin', 'name' => 'system_config', 'workspaces' => 'online', 'labels' => array('tabs_images' => array('tab' => '../Resources/Public/Icons/module-config.png'), 'll_ref' => 'LLL:EXT:lowlevel/config/locallang_mod.xlf'))); }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { // Add module \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('system', 'txschedulerM1', '', '', array('routeTarget' => \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::class . '::mainAction', 'access' => 'admin', 'name' => 'system_txschedulerM1', 'icon' => 'EXT:scheduler/Resources/Public/Icons/module-scheduler.svg', 'labels' => 'LLL:EXT:scheduler/Resources/Private/Language/locallang_mod.xlf')); // Add context sensitive help (csh) to the backend module \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_system_txschedulerM1', 'EXT:scheduler/Resources/Private/Language/locallang_csh_scheduler.xlf'); }
/** * Registers an Extbase module (main or sub) to the backend interface. * FOR USE IN ext_tables.php FILES * * @param string $extensionName The extension name (in UpperCamelCase) or the extension key (in lower_underscore) * @param string $mainModuleName The main module key. So $main would be an index in the $TBE_MODULES array and $sub could be an element in the lists there. If $subModuleName is not set a blank $extensionName module is created * @param string $subModuleName The submodule key. * @param string $position This can be used to set the position of the $sub module within the list of existing submodules for the main module. $position has this syntax: [cmd]:[submodule-key]. cmd can be "after", "before" or "top" (or blank which is default). If "after"/"before" then submodule will be inserted after/before the existing submodule with [submodule-key] if found. If not found, the bottom of list. If "top" the module is inserted in the top of the submodule list. * @param array $controllerActions is an array of allowed combinations of controller and action stored in an array (controller name as key and a comma separated list of action names as value, the first controller and its first action is chosen as default) * @param array $moduleConfiguration The configuration options of the module (icon, locallang.xlf file) * @throws \InvalidArgumentException * @return void */ public static function registerModule($extensionName, $mainModuleName = '', $subModuleName = '', $position = '', array $controllerActions = array(), array $moduleConfiguration = array()) { if (empty($extensionName)) { throw new \InvalidArgumentException('The extension name must not be empty', 1239891990); } // Check if vendor name is prepended to extensionName in the format {vendorName}.{extensionName} $vendorName = NULL; if (FALSE !== ($delimiterPosition = strrpos($extensionName, '.'))) { $vendorName = str_replace('.', '\\', substr($extensionName, 0, $delimiterPosition)); $extensionName = substr($extensionName, $delimiterPosition + 1); } $extensionKey = \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($extensionName); $extensionName = str_replace(' ', '', ucwords(str_replace('_', ' ', $extensionName))); $defaultModuleConfiguration = array('access' => 'admin', 'icon' => 'EXT:extbase/ext_icon.gif', 'labels' => '', 'extRelPath' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extensionKey) . 'Classes/'); if (strlen($mainModuleName) > 0 && !array_key_exists($mainModuleName, $GLOBALS['TBE_MODULES'])) { $mainModuleName = $extensionName . \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($mainModuleName); } else { $mainModuleName = strlen($mainModuleName) > 0 ? $mainModuleName : 'web'; } // add mandatory parameter to use new pagetree if ($mainModuleName === 'web') { $defaultModuleConfiguration['navigationComponentId'] = 'typo3-pagetree'; } \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($defaultModuleConfiguration, $moduleConfiguration); $moduleConfiguration = $defaultModuleConfiguration; $moduleSignature = $mainModuleName; if (strlen($subModuleName) > 0) { $subModuleName = $extensionName . \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($subModuleName); $moduleSignature .= '_' . $subModuleName; } $moduleConfiguration['name'] = $moduleSignature; if (NULL !== $vendorName) { $moduleConfiguration['vendorName'] = $vendorName; } $moduleConfiguration['extensionName'] = $extensionName; $moduleConfiguration['configureModuleFunction'] = array('TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility', 'configureModule'); $GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature] = $moduleConfiguration; if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature])) { $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature] = array(); } foreach ($controllerActions as $controllerName => $actions) { $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature]['controllers'][$controllerName] = array('actions' => \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $actions)); } \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule($mainModuleName, $subModuleName, $position); }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'perm', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod1/'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('PermissionAjaxController::dispatch', 'TYPO3\\CMS\\Perm\\Controller\\PermissionAjaxController->dispatch'); }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('help', 'cshmanual', 'top', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod/'); }
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { $extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'ts', '', $extensionPath . 'ts/'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_ts', 'TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateConstantEditorModuleFunctionController', NULL, 'LLL:EXT:tstemplate/ts/locallang.xlf:constantEditor'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_ts', 'TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController', NULL, 'LLL:EXT:tstemplate/ts/locallang.xlf:infoModify'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_ts', 'TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateObjectBrowserModuleFunctionController', NULL, 'LLL:EXT:tstemplate/ts/locallang.xlf:objectBrowser'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_ts', 'TYPO3\\CMS\\Tstemplate\\Controller\\TemplateAnalyzerModuleFunctionController', NULL, 'LLL:EXT:tstemplate/ts/locallang.xlf:templateAnalyzer'); }
<?php /** * TYPO3 Extension configuration for the tx_phpmyadmin Extension * * @author mehrwert <*****@*****.**> * @package TYPO3 * @subpackage tx_phpmyadmin * @license GPL */ if (!defined('TYPO3_MODE')) { die('Access denied.'); } // Get config $extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['phpmyadmin']); // Check for IP restriction (devIpMask), and die if not allowed $showPhpMyAdminInWebModule = (bool) $extensionConfiguration['showPhpMyAdminInWebModule']; // If the backend is loaded, add the module if (TYPO3_MODE == 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('tools', 'txphpmyadmin', '', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'BeModule/', array('access' => 'admin', 'icon' => 'EXT:phpmyadmin/Resources/Public/Icons/module-phpmyadmin.png', 'labels' => 'LLL:EXT:phpmyadmin/Resources/Private/Language/locallang_mod.xlf')); } // Do not load post processing class if TYPO3 is in CLI mode if (!defined('TYPO3_cliMode') || TYPO3_cliMode !== TRUE) { $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_post_processing'][] = 'Tx_Phpmyadmin_Hooks_BeUserAuthLogOffHook->pmaLogOff'; } // The subdirectory where the pMA source is located (used for cookie removal and script inclusion) $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['phpmyadmin']['pmaDirname'] = 'phpMyAdmin-4.4.15.1-all-languages';
<?php defined('TYPO3_MODE') or die; if (TYPO3_MODE === 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('user', 'task', 'top', '', ['routeTarget' => \TYPO3\CMS\Taskcenter\Controller\TaskModuleController::class . '::mainAction', 'access' => 'group,user', 'name' => 'user_task', 'icon' => 'EXT:taskcenter/Resources/Public/Icons/module-taskcenter.svg', 'labels' => 'LLL:EXT:taskcenter/Resources/Private/Language/locallang_mod.xlf']); }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } if (TYPO3_MODE == 'BE') { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('tools_txtaskcenterM1', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'task/'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('user', 'task', 'top', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'task/'); $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveCollapseState'] = 'EXT:taskcenter/Classes/class.tx_taskcenter_status.php:TYPO3\\CMS\\Taskcenter\\TaskStatus->saveCollapseState'; $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveSortingState'] = 'EXT:taskcenter/Classes/class.tx_taskcenter_status.php:TYPO3\\CMS\\Taskcenter\\TaskStatus->saveSortingState'; }