php TYPO3-CMS-Backend-Sprite-SpriteManager类(方法)实例源码

下面列出了php TYPO3-CMS-Backend-Sprite-SpriteManager 类(方法)源码代码实例,从而了解它的用法。

作者:nicksergi    项目:TYPO3v4-Cor   
/**
  * Set up test case
  *
  * @return void
  */
 public function setUp()
 {
     // Initialize sprites (done only once)
     \TYPO3\CMS\Backend\Sprite\SpriteManager::initialize();
     // Backup sprites because they will be reset by PHPUnit global backup
     if (empty(self::$tbeStylesBackup)) {
         self::$tbeStylesBackup = $GLOBALS['TBE_STYLES'];
     } else {
         // Restore the internal backup
         $GLOBALS['TBE_STYLES'] = self::$tbeStylesBackup;
     }
     // Simulate a tt_content record
     $this->mockRecord = array();
     $this->mockRecord['header'] = 'dummy content header';
     $this->mockRecord['uid'] = '1';
     $this->mockRecord['pid'] = '1';
     $this->mockRecord['image'] = '';
     $this->mockRecord['hidden'] = '0';
     $this->mockRecord['starttime'] = '0';
     $this->mockRecord['endtime'] = '0';
     $this->mockRecord['fe_group'] = '';
     $this->mockRecord['CType'] = 'text';
     $this->mockRecord['t3ver_id'] = '0';
     $this->mockRecord['t3ver_state'] = '0';
     $this->mockRecord['t3ver_wsid'] = '0';
     $this->mockRecord['sys_language_uid'] = '0';
     $this->mockRecord['l18n_parent'] = '0';
     $this->mockRecord['subheader'] = '';
     $this->mockRecord['bodytext'] = '';
 }

作者:RocKordie    项目:typo3-mkli   
public function setUp()
 {
     $this->oSelector = tx_rnbase::makeInstance('tx_mklib_mod1_util_Selector');
     $this->oMod = tx_rnbase::makeInstance('tx_mklib_tests_fixtures_classes_DummyMod');
     $this->oSelector->init($this->oMod);
     $this->sModuleKey = 'testSearch';
     //Modul daten zurücksetzen
     $GLOBALS['BE_USER']->uc['moduleData'][$this->oMod->getName()] = null;
     $_GET['SET'] = null;
     //für cli
     $GLOBALS['TBE_TEMPLATE'] = t3lib_div::makeInstance('template');
     $GLOBALS['CLIENT']['FORMSTYLE'] = 'something';
     //sprache auf default setzen damit wir die richtigen labels haben
     $GLOBALS['LANG']->lang = 'default';
     //damit labels geladen sind
     global $LOCAL_LANG;
     //ab typo 4.6 ist das mit den lang labels anders
     $mHideEntry = 'Hide hidden entries';
     $mShowEntry = 'Show hidden entries';
     if (tx_rnbase_util_TYPO3::isTYPO46OrHigher()) {
         $LOCAL_LANG['default']['label_select_hide_hidden'][0]['target'] = $mHideEntry;
         $LOCAL_LANG['default']['label_select_show_hidden'][0]['target'] = $mShowEntry;
     } else {
         $LOCAL_LANG['default']['label_select_hide_hidden'] = $mHideEntry;
         $LOCAL_LANG['default']['label_select_show_hidden'] = $mShowEntry;
     }
     // sonst fehler die icon klassen
     if (tx_rnbase_util_TYPO3::isTYPO60OrHigher()) {
         \TYPO3\CMS\Backend\Sprite\SpriteManager::initialize();
     }
 }

作者:r3h    项目:TYPO3.EXT.error404pag   
public static function addDoktype($extKey, $doktype, $iconName)
 {
     $customPageIcon = static::getCustomPageIcon($extKey, $iconName);
     // Add the new doktype to the list of page types
     $GLOBALS['PAGES_TYPES'][$doktype] = array('type' => 'web', 'icon' => $customPageIcon, 'allowedTables' => '*');
     // Add the icon for the new doktype
     \TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', $doktype, $customPageIcon);
     // Add the new doktype to the list of types available from the new page menu at the top of the page tree
     \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . $doktype . ')');
 }

作者:c2p    项目:autoloade   
/**
  * Add the given icon to the TCA table type
  *
  * @param string $table
  * @param string $type
  * @param string $icon
  */
 public static function addTcaTypeIcon($table, $type, $icon)
 {
     if (GeneralUtility::compat_version('7.0')) {
         $fullIconPath = substr(PathUtility::getAbsoluteWebPath($icon), 1);
         if (StringUtility::endsWith(strtolower($fullIconPath), 'svg')) {
             $iconProviderClass = 'TYPO3\\CMS\\Core\\Imaging\\IconProvider\\SvgIconProvider';
         } else {
             $iconProviderClass = 'TYPO3\\CMS\\Core\\Imaging\\IconProvider\\BitmapIconProvider';
         }
         /** @var IconRegistry $iconRegistry */
         $iconRegistry = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Imaging\\IconRegistry');
         $iconIdentifier = 'tcarecords-' . $table . '-' . $type;
         $iconRegistry->registerIcon($iconIdentifier, $iconProviderClass, ['source' => $fullIconPath]);
         $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'][$type] = $iconIdentifier;
     } else {
         $fullIconPath = str_replace('../typo3/', '', $icon);
         SpriteManager::addTcaTypeIcon('tt_content', $type, $fullIconPath);
     }
 }

作者:noxlud    项目:TYPO3v4-Cor   
/**
  * Set up test case
  *
  * @return void
  */
 public function setUp()
 {
     if (!\TYPO3\CMS\Backend\Sprite\SpriteManager::isInitialized()) {
         \TYPO3\CMS\Backend\Sprite\SpriteManager::initialize();
     }
     // Simulate a tt_content record
     $this->mockRecord = array();
     $this->mockRecord['header'] = 'dummy content header';
     $this->mockRecord['uid'] = '1';
     $this->mockRecord['pid'] = '1';
     $this->mockRecord['image'] = '';
     $this->mockRecord['hidden'] = '0';
     $this->mockRecord['starttime'] = '0';
     $this->mockRecord['endtime'] = '0';
     $this->mockRecord['fe_group'] = '';
     $this->mockRecord['CType'] = 'text';
     $this->mockRecord['t3ver_id'] = '0';
     $this->mockRecord['t3ver_state'] = '0';
     $this->mockRecord['t3ver_wsid'] = '0';
     $this->mockRecord['sys_TYPO3\\CMS\\Lang\\LanguageService_uid'] = '0';
     $this->mockRecord['l18n_parent'] = '0';
     $this->mockRecord['subheader'] = '';
     $this->mockRecord['bodytext'] = '';
 }

作者:simpletypo    项目:dynami   
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$doktypeIcon = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('dynamic') . 'layout.png';
$doktypeMagicNumber = 85;
$GLOBALS['PAGES_TYPES'][$doktypeMagicNumber] = array('type' => 'web', 'icon' => $doktypeIcon, 'allowedTables' => '*');
$GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'][] = array('Dynamic', $doktypeMagicNumber, $doktypeIcon);
$GLOBALS['TCA']['pages_language_overlay']['columns']['doktype']['config']['items'][] = array('Dynamic', $doktypeMagicNumber, $doktypeIcon);
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', $doktypeMagicNumber, $doktypeIcon);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . $doktypeMagicNumber . ')');

作者:khanhdeu    项目:typo3tes   
// Notice, this line uses the the 'scriptIDindex' feature to override another value in this array (namely $TBE_STYLES['mainColors']['bgColor5']), for a specific script "typo3/alt_clickmenu.php"
    $TBE_STYLES['scriptIDindex']['typo3/alt_clickmenu.php']['mainColors']['bgColor5'] = '#dedede';
    // Setting up auto detection of alternative icons:
    $TBE_STYLES['skinImgAutoCfg'] = array('absDir' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'icons/', 'relDir' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'icons/', 'forceFileExtension' => 'gif', 'iconSizeWidth' => 16, 'iconSizeHeight' => 16);
    // Changing icon for filemounts, needs to be done here as overwriting the original icon would also change the filelist tree's root icon
    $TCA['sys_filemounts']['ctrl']['iconfile'] = '_icon_ftp_2.gif';
    // Adding flags to sys_language
    $TCA['sys_language']['ctrl']['typeicon_column'] = 'flag';
    $TCA['sys_language']['ctrl']['typeicon_classes'] = array('default' => 'mimetypes-x-sys_language', 'mask' => 'flags-###TYPE###');
    $flagNames = array('multiple', 'ad', 'ae', 'af', 'ag', 'ai', 'al', 'am', 'an', 'ao', 'ar', 'as', 'at', 'au', 'aw', 'ax', 'az', 'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi', 'bj', 'bm', 'bn', 'bo', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz', 'ca', 'catalonia', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn', 'co', 'cr', 'cs', 'cu', 'cv', 'cx', 'cy', 'cz', 'de', 'dj', 'dk', 'dm', 'do', 'dz', 'ec', 'ee', 'eg', 'eh', 'england', 'er', 'es', 'et', 'europeanunion', 'fam', 'fi', 'fj', 'fk', 'fm', 'fo', 'fr', 'ga', 'gb', 'gd', 'ge', 'gf', 'gh', 'gi', 'gl', 'gm', 'gn', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'gw', 'gy', 'hk', 'hm', 'hn', 'hr', 'ht', 'hu', 'id', 'ie', 'il', 'in', 'io', 'iq', 'ir', 'is', 'it', 'jm', 'jo', 'jp', 'ke', 'kg', 'kh', 'ki', 'km', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz', 'la', 'lb', 'lc', 'li', 'lk', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly', 'ma', 'mc', 'md', 'me', 'mg', 'mh', 'mk', 'ml', 'mm', 'mn', 'mo', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'nc', 'ne', 'nf', 'ng', 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz', 'om', 'pa', 'pe', 'pf', 'pg', 'ph', 'pk', 'pl', 'pm', 'pn', 'pr', 'ps', 'pt', 'pw', 'py', 'qa', 'qc', 're', 'ro', 'rs', 'ru', 'rw', 'sa', 'sb', 'sc', 'scotland', 'sd', 'se', 'sg', 'sh', 'si', 'sj', 'sk', 'sl', 'sm', 'sn', 'so', 'sr', 'st', 'sv', 'sy', 'sz', 'tc', 'td', 'tf', 'tg', 'th', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'tr', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'um', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu', 'wales', 'wf', 'ws', 'ye', 'yt', 'za', 'zm', 'zw');
    foreach ($flagNames as $flagName) {
        $TCA['sys_language']['columns']['flag']['config']['items'][] = array($flagName, $flagName, 'EXT:t3skin/images/flags/' . $flagName . '.png');
    }
    $TCA['pages']['columns']['module']['config']['items'][1][2] = 'EXT:t3skin/images/icons/status/user-frontend.png';
    // Manual setting up of alternative icons. This is mainly for module icons which has a special prefix:
    $TBE_STYLES['skinImg'] = array_merge($presetSkinImgs, array('gfx/ol/blank.gif' => array('clear.gif', 'width="18" height="16"'), 'MOD:web/website.gif' => array($temp_eP . 'icons/module_web.gif', 'width="24" height="24"'), 'MOD:web_layout/layout.gif' => array($temp_eP . 'icons/module_web_layout.gif', 'width="24" height="24"'), 'MOD:web_view/view.gif' => array($temp_eP . 'icons/module_web_view.png', 'width="24" height="24"'), 'MOD:web_list/list.gif' => array($temp_eP . 'icons/module_web_list.gif', 'width="24" height="24"'), 'MOD:web_info/info.gif' => array($temp_eP . 'icons/module_web_info.png', 'width="24" height="24"'), 'MOD:web_perm/perm.gif' => array($temp_eP . 'icons/module_web_perms.png', 'width="24" height="24"'), 'MOD:web_func/func.gif' => array($temp_eP . 'icons/module_web_func.png', 'width="24" height="24"'), 'MOD:web_ts/ts1.gif' => array($temp_eP . 'icons/module_web_ts.gif', 'width="24" height="24"'), 'MOD:web_modules/modules.gif' => array($temp_eP . 'icons/module_web_modules.gif', 'width="24" height="24"'), 'MOD:web_txversionM1/cm_icon.gif' => array($temp_eP . 'icons/module_web_version.gif', 'width="24" height="24"'), 'MOD:file/file.gif' => array($temp_eP . 'icons/module_file.gif', 'width="22" height="24"'), 'MOD:file_list/list.gif' => array($temp_eP . 'icons/module_file_list.gif', 'width="22" height="24"'), 'MOD:file_images/images.gif' => array($temp_eP . 'icons/module_file_images.gif', 'width="22" height="22"'), 'MOD:user/user.gif' => array($temp_eP . 'icons/module_user.gif', 'width="22" height="22"'), 'MOD:user_task/task.gif' => array($temp_eP . 'icons/module_user_taskcenter.gif', 'width="22" height="22"'), 'MOD:user_setup/setup.gif' => array($temp_eP . 'icons/module_user_setup.gif', 'width="22" height="22"'), 'MOD:user_doc/document.gif' => array($temp_eP . 'icons/module_doc.gif', 'width="22" height="22"'), 'MOD:user_ws/sys_workspace.gif' => array($temp_eP . 'icons/module_user_ws.gif', 'width="22" height="22"'), 'MOD:tools/tool.gif' => array($temp_eP . 'icons/module_tools.gif', 'width="25" height="24"'), 'MOD:tools_em/em.gif' => array($temp_eP . 'icons/module_tools_em.png', 'width="24" height="24"'), 'MOD:tools_em/install.gif' => array($temp_eP . 'icons/module_tools_em.gif', 'width="24" height="24"'), 'MOD:tools_txphpmyadmin/thirdparty_db.gif' => array($temp_eP . 'icons/module_tools_phpmyadmin.gif', 'width="24" height="24"'), 'MOD:tools_isearch/isearch.gif' => array($temp_eP . 'icons/module_tools_isearch.gif', 'width="24" height="24"'), 'MOD:system_dbint/db.gif' => array($temp_eP . 'icons/module_system_dbint.gif', 'width="25" height="24"'), 'MOD:system_beuser/beuser.gif' => array($temp_eP . 'icons/module_system_user.gif', 'width="24" height="24"'), 'MOD:system_install/install.gif' => array($temp_eP . 'icons/module_system_install.gif', 'width="24" height="24"'), 'MOD:system_config/config.gif' => array($temp_eP . 'icons/module_system_config.gif', 'width="24" height="24"'), 'MOD:system_log/log.gif' => array($temp_eP . 'icons/module_system_log.gif', 'width="24" height="24"'), 'MOD:help/help.gif' => array($temp_eP . 'icons/module_help.gif', 'width="23" height="24"'), 'MOD:help_about/info.gif' => array($temp_eP . 'icons/module_help_about.gif', 'width="25" height="24"'), 'MOD:help_aboutmodules/aboutmodules.gif' => array($temp_eP . 'icons/module_help_aboutmodules.gif', 'width="24" height="24"'), 'MOD:help_cshmanual/about.gif' => array($temp_eP . 'icons/module_help_cshmanual.gif', 'width="25" height="24"'), 'MOD:help_txtsconfighelpM1/moduleicon.gif' => array($temp_eP . 'icons/module_help_ts.gif', 'width="25" height="24"')));
    // Logo at login screen
    $TBE_STYLES['logo_login'] = $temp_eP . 'images/login/typo3logo-white-greyback.gif';
    // extJS theme
    $TBE_STYLES['extJS']['theme'] = $temp_eP . 'extjs/xtheme-t3skin.css';
    // Adding HTML template for login screen
    $TBE_STYLES['htmlTemplates']['EXT:backend/Resources/Private/Templates/login.html'] = 'sysext/t3skin/Resources/Private/Templates/login.html';
    $GLOBALS['TBE_STYLES']['stylesheets']['admPanel'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('t3skin') . 'stylesheets/standalone/admin_panel.css';
    $flagIcons = array();
    foreach ($flagNames as $flagName) {
        $flagIcons[] = 'flags-' . $flagName;
        $flagIcons[] = 'flags-' . $flagName . '-overlay';
    }
    \TYPO3\CMS\Backend\Sprite\SpriteManager::addIconSprite($flagIcons);
    unset($flagNames, $flagName, $flagIcons);
}

作者:shugde    项目:focuspoin   
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\HDNET\Autoloader\Loader::extTables('HDNET', 'focuspoint');
$icons = array('focuspoint' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('focuspoint') . 'ext_icon.png');
// Gives the $icon array to the sprite manager
\TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons($icons, 'focuspoint');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('focuspoint', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/Focuspoint/');
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['focuspoint_test'] = 'image,image_ratio';

作者:itrib    项目:typoscript_cod   
<?php

defined('TYPO3_MODE') or die;
/** @var string $_EXTKEY */
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Content', 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:plugins.title', 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/tt_content_ts.gif');
if (TYPO3_MODE === 'BE') {
    if (version_compare(TYPO3_branch, '7.6', '<')) {
        // @see Deprecation: #70477 - Deprecate SpriteIcon classes
        \TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons(array('content' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'ext_icon.gif'), $_EXTKEY);
    } else {
        /** @noinspection PhpUndefinedClassInspection */
        /** @var \TYPO3\CMS\Core\Imaging\IconRegistry $prefaIconRegistry */
        $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Imaging\\IconRegistry');
        $iconRegistry->registerIcon('extensions-typoscript_code-content', 'TYPO3\\CMS\\Core\\Imaging\\IconProvider\\BitmapIconProvider', array('source' => 'EXT:typoscript_code/Resources/Public/Icons/tt_content_ts.png'));
    }
}

作者:nicksergi    项目:TYPO3v4-Cor   
/**
  * @test
  */
 public function addSingleIconsWithNormalValueSetsImagePathValue()
 {
     $type = 'contains-news';
     $imagePath = 'path/to/my-icon.png';
     $icons = array($type => $imagePath);
     $extensionKey = 'dummy';
     \TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons($icons, $extensionKey);
     $this->assertEquals($imagePath, $GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['extensions-' . $extensionKey . '-' . $type]);
 }

作者:kalypso6    项目:px_hybrid_aut   
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
// Identity-Plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Identity', 'LLL:EXT:px_hybrid_auth/Resources/Private/Language/locallang_db.xlf:plugins.identity.name');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'HybridAuth');
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('tt_content', 'px_hybrid_auth_login', '../typo3conf/ext/px_hybrid_auth/Resources/Public/Icons/px_hybrid_auth_login_form_no_bg.gif');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:px_hybrid_auth/Configuration/TypoScript/PageTSConfig.txt">');

作者:boristim    项目:formhandle   
* @package    Tx_Formhandler
 */
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
if (TYPO3_MODE === 'BE') {
    $TCA['tt_content']['types'][$_EXTKEY . '_pi1']['showitem'] = '
		--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
		--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
		--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.plugin,pi_flexform,
		--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
		--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.visibility;visibility,
		--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
		--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
		--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames,
		--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.behaviour,
		--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
	';
    // Add flexform field to plugin options
    $TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi1'] = 'pi_flexform';
    $file = 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_ds.xml';
    // Add flexform DataStructure
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', $file, $_EXTKEY . '_pi1');
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:formhandler/Resources/Private/Language/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY . '_pi1'), 'CType');
    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('Typoheads.' . $_EXTKEY, 'web', 'log', 'bottom', array('Module' => 'index, view, selectFields, export, deleteLogRows'), array('access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/moduleicon.gif', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xml'));
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/ExampleConfiguration', 'Example Configuration');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_formhandler_log');
$TCA['pages']['columns']['module']['config']['items'][] = array('LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:title', 'formlogs', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'ext_icon.gif');
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', 'contains-formlogs', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Images/pagetreeicon.png');

作者:ruudsilvrant    项目:news_importe   
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'News importer');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_newsimporter_domain_model_importsource', 'EXT:news_importer/Resources/Private/Language/locallang_csh_tx_newsimporter_domain_model_importsource.xlf');
//add contains plugin
$TCA['pages']['columns']['module']['config']['items'][] = array('News import sources', 'imports', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'ext_icon.png');
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', 'contains-imports', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'ext_icon.png');
if (TYPO3_MODE === 'BE') {
    /**
     * Registers a Backend Module
     */
    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('BeechIt.' . $_EXTKEY, 'web', 'newsimporter', '', array('Admin' => 'index,show,import'), array('access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.png', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be_module.xlf'));
}

作者:maab12    项目:default   
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
/**
 * additional page type: page container; doktype 21.
 */
$newPageType = array('LLL:EXT:go_tsconfig/Resources/Private/Language/locallang_db.xml:pages.doktypes.pagecontainer', '21', 'EXT:go_tsconfig/Resources/Public/Icons/doktype_icon_pagecontainer.png');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('pages', 'doktype', $newPageType, '254', 'before');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('pages_language_overlay', 'doktype', $newPageType, '254', 'before');
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', '21', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/doktype_icon_pagecontainer.png');
/**
 * new columns for page and pages_language_overlay
 */
$tempColumns = array('tx_gotsconfig_logo' => array('exclude' => 1, 'label' => 'LLL:EXT:go_tsconfig/Resources/Private/Language/locallang_db.xml:pages.tx_gotsconfig_logo', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('tx_gotsconfig_logo', array('appearance' => array('createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'), 'maxitems' => 1, 'foreign_types' => array('0' => array('showitem' => '--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette'), \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array('showitem' => '--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette'))), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'])));
$tempColumns1 = array('image' => array('exclude' => 1, 'label' => 'LLL:EXT:go_tsconfig/Resources/Private/Language/locallang_db.xml:pages.image', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('image', array('appearance' => array('createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'), 'maxitems' => 1, 'foreign_types' => array('0' => array('showitem' => '--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette'), \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array('showitem' => '--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette'))), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'])));
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $tempColumns1, 1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $tempColumns, 1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages_language_overlay', $tempColumns, 1);
unset($tempColumns);
unset($tempColumns1);
/**
 * define page types for fields to add
 */
$pageTypeArray = array(\TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_DEFAULT, \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK, \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SHORTCUT, \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_BE_USER_SECTION, \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_MOUNTPOINT, '21');
/**
 * add logo field
 */
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', 'tx_gotsconfig_logo', implode(',', $pageTypeArray), 'before:--palette--;;media');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages_language_overlay', 'tx_gotsconfig_logo', implode(',', $pageTypeArray), 'before:--palette--;;media');

作者:saneinsan    项目:calendariz   
<?php

/**
 * General ext_tables file and also an example for your own extension
 *
 * @category Extension
 * @package  Calendarize
 * @author   Tim Lochmüller
 */
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\HDNET\Autoloader\Loader::extTables('HDNET', 'calendarize', \HDNET\Calendarize\Register::getDefaultAutoloader());
if (!(bool) \HDNET\Calendarize\Utility\ConfigurationUtility::get('disableDefaultEvent')) {
    \HDNET\Calendarize\Register::extTables(\HDNET\Calendarize\Register::getDefaultCalendarizeConfiguration());
    \TYPO3\CMS\Core\Category\CategoryRegistry::getInstance()->add('calendarize', 'tx_calendarize_domain_model_event');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('calendarize', 'Calendar', \HDNET\Calendarize\Utility\TranslateUtility::get('pluginName'));
if (\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('7.0.0')) {
    $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['calendarize_calendar'] .= ',categories';
}
// module icon
$extensionIcon = \HDNET\Autoloader\Utility\IconUtility::getByExtensionKey('calendarize', true);
if (\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('7.0')) {
    /** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
    $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Imaging\\IconRegistry');
    $iconRegistry->registerIcon('apps-pagetree-folder-contains-calendarize', 'TYPO3\\CMS\\Core\\Imaging\\IconProvider\\BitmapIconProvider', ['source' => $extensionIcon]);
} else {
    $extensionRelPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('calendarize');
    \TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', 'contains-calendar', str_replace('EXT:calendarize/', $extensionRelPath, $extensionIcon));
}

作者:typo3-moo    项目:moox_commen   
$mainModuleKey = "DCNGmbH." . $_EXTKEY;
            $mainModuleIcon = 'EXT:' . $_EXTKEY . '/Resources/Public/Moox/module-mooxcore-white.svg';
            $mainModuleLabels = 'LLL:EXT:' . $_EXTKEY . '/Resources/Public/Moox/Module.xlf:moox_main_module_tab';
        }
        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule($mainModuleKey, $mainModuleName, '', '', [], ['access' => 'user,group', 'icon' => $mainModuleIcon, 'labels' => $mainModuleLabels]);
    }
    /**
     * Registers a Backend Module
     */
    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('DCNGmbH.' . $_EXTKEY, $mainModuleName, 'administration', '', ['Template' => 'index,add,edit,delete,previewIframe'], ['access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/module-mooxcomment.svg', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_init.xlf']);
}
// Add flexforms
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_pi1';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_pi1.xml');
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_pi2';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_pi2.xml');
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_pi3';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_pi3.xml');
// Add typoscripts
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'MOOX Comment');
// Add Wizard Icons
if (TYPO3_MODE == 'BE') {
    $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['DCNGmbH\\MooxComment\\Hooks\\Wizicon'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Classes/Hooks/Wizicon.php';
}
// Icon in page tree
$TCA['pages']['columns']['module']['config']['items'][] = ['MOOX-Comments', 'mxcomment', 'EXT:moox_comment/ext_icon.svg'];
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', 'contains-mxcomment', '../typo3conf/ext/moox_comment/ext_icon.svg');

作者:rickymathe    项目:TYPO3.CM   
/**
  * Initialize sprite manager
  *
  * @return Bootstrap
  * @internal This is not a public API method, do not use in own extensions
  * @deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8
  */
 public function initializeSpriteManager()
 {
     // This method is deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8
     // This method does not log a deprecation message, because it is used only in the request handlers
     // and would break icons from IconUtility::getSpriteIcon() if we remove it yet.
     \TYPO3\CMS\Backend\Sprite\SpriteManager::initialize();
     return $this;
 }

作者:spoonerWe    项目:irfa   
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_irfaq_q');
$TCA['tx_irfaq_q'] = array('ctrl' => array('title' => 'LLL:EXT:irfaq/lang/locallang_db.xml:tx_irfaq_q', 'label' => 'q', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'sortby' => 'sorting', 'delete' => 'deleted', 'transOrigPointerField' => 'l18n_parent', 'transOrigDiffSourceField' => 'l18n_diffsource', 'languageField' => 'sys_language_uid', 'enablecolumns' => array('disabled' => 'hidden', 'fe_group' => 'fe_group'), 'dividers2tabs' => true, 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'tca/tca_q.php', 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'res/icon_tx_irfaq_q.gif', 'searchFields' => 'q, q_from, a, related_links'), 'feInterface' => array('fe_admin_fieldList' => 'hidden, fe_group, q, cat, a, related'));
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_irfaq_cat');
$TCA['tx_irfaq_cat'] = array('ctrl' => array('title' => 'LLL:EXT:irfaq/lang/locallang_db.xml:tx_irfaq_cat', 'label' => 'title', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'sortby' => 'sorting', 'delete' => 'deleted', 'transOrigPointerField' => 'l18n_parent', 'transOrigDiffSourceField' => 'l18n_diffsource', 'languageField' => 'sys_language_uid', 'enablecolumns' => array('disabled' => 'hidden', 'fe_group' => 'fe_group'), 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'tca/tca_cat.php', 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'res/icon_tx_irfaq_cat.gif', 'searchFields' => 'title'), 'feInterface' => array('fe_admin_fieldList' => 'hidden, fe_group, title'));
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_irfaq_expert');
$TCA['tx_irfaq_expert'] = array('ctrl' => array('title' => 'LLL:EXT:irfaq/lang/locallang_db.xml:tx_irfaq_expert', 'label' => 'name', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'default_sortby' => 'ORDER BY crdate', 'transOrigPointerField' => 'l18n_parent', 'transOrigDiffSourceField' => 'l18n_diffsource', 'languageField' => 'sys_language_uid', 'delete' => 'deleted', 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'tca/tca_expert.php', 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'res/icon_tx_irfaq_expert.gif', 'searchFields' => 'name, email, url'), 'feInterface' => array('fe_admin_fieldList' => 'name, email, url'));
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi1'] = 'layout,select_key,pages';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi1'] = 'pi_flexform';
//adding sysfolder icon
$TCA['pages']['columns']['module']['config']['items'][$_EXTKEY]['0'] = 'LLL:EXT:irfaq/lang/locallang_db.xml:tx_irfaq.sysfolder';
$TCA['pages']['columns']['module']['config']['items'][$_EXTKEY]['1'] = $_EXTKEY;
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'static/ts/', 'IRFAQ default TS');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:irfaq/lang/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY . '_pi1'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY . '_pi1', 'FILE:EXT:irfaq/flexform/flexform_ds.xml');
if (TYPO3_MODE == 'BE') {
    $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_irfaq_pi1_wizicon'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'pi1/class.tx_irfaq_pi1_wizicon.php';
    \TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', 'contains-irfaq', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'res/icon_tx_irfaq_sysfolder.gif');
}

作者:camrun9    项目:fal_securedownloa   
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Filetree', 'LLL:EXT:fal_securedownload/Resources/Private/Language/locallang_be.xlf:plugin.title');
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_filetree';
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'layout,recursive,select_key,pages';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/FileTree.xml');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'FileTree');
if (TYPO3_MODE === 'BE') {
    // Add click menu item:
    $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = array('name' => 'BeechIt\\FalSecuredownload\\Hooks\\ClickMenuOptions');
}
\TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons(array('folder' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/folder.png', 'overlay-permissions' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/permissions-set-in-root-line.png'), 'fal_securedownload');

作者:Mr-Robot    项目:TYPO3.CM   
<?php

defined('TYPO3_MODE') or die;
if (TYPO3_MODE === 'BE') {
    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('TYPO3.CMS.' . $_EXTKEY, 'tools', 'extensionmanager', '', array('List' => 'index,unresolvedDependencies,ter,showAllVersions,distributions', 'Action' => 'toggleExtensionInstallationState,installExtensionWithoutSystemDependencyCheck,removeExtension,downloadExtensionZip,downloadExtensionData', 'Configuration' => 'showConfigurationForm,save,saveAndClose', 'Download' => 'checkDependencies,installFromTer,installExtensionWithoutSystemDependencyCheck,installDistribution,updateExtension,updateCommentForUpdatableVersions', 'UpdateScript' => 'show', 'UpdateFromTer' => 'updateExtensionListFromTer', 'UploadExtensionFile' => 'form,extract', 'Distribution' => 'show'), array('access' => 'admin', 'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/module-extensionmanager.png', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf'));
    // Register extension status report system
    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['Extension Manager'][] = 'TYPO3\\CMS\\Extensionmanager\\Report\\ExtensionStatus';
}
// Register specific icon for update script button
\TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons(array('update-script' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Images/Icons/ExtensionUpdateScript.png'), $_EXTKEY);


问题


面经


文章

微信
公众号

扫码关注公众号