コード例 #1
0
 public static function addDoktypeToPagesLanguageOverlay($extKey, $doktype, $iconName, $alias = null)
 {
     if (static::useCompatibility6()) {
         Compatibility6\CustomPageUtility::addDoktypeToPagesLanguageOverlay($extKey, $doktype, $iconName, $alias);
         return;
     }
     $identifier = 'apps-pagetree-' . strtolower($iconName);
     $extRelPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extKey);
     $customPageIcon = $extRelPath . 'Resources/Public/Icons/' . $identifier . '.svg';
     // Add new page type as possible select item:
     \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('pages_language_overlay', 'doktype', array('LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_be.xlf:pages.doktype.' . ($alias === null ? $doktype : $alias), $doktype, $customPageIcon), '1', 'after');
 }
コード例 #2
0
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Qbus Bootstrap');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('Bildergalerie', 'qbbootstrap_gallery', 'i/tt_content_image.gif'), 'textpic', 'after');
$GLOBALS['TCA']['tt_content']['types']['qbbootstrap_gallery']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,  image, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.imagelinks;imagelinks, layout, --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, --div--;LLL:EXT:gridelements/Resources/Private/Language/locallang_db.xlf:gridElements, tx_gridelements_container, tx_gridelements_columns';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['qbbootstrap_gallery'] = 'mimetypes-x-content-image';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['qbbootstrap_gallery'] = 'tt_content_image.gif';
コード例 #3
0
ファイル: ext_tables.php プロジェクト: dsusk/typo3-tmpl_sub
 */
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['Social Infobox', 'tmplsub_socialinfobox'], 'CType');
/**
 * Prepare TCA for Custom Fluid Content Element
 */
$TCA['tt_content']['types']['tmplsub_socialinfobox']['showitem'] = $TCA['tt_content']['types']['bullets']['showitem'];
/**
 * Register Lecture Content Element
 */
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['Lectures', 'tmplsub_lectures'], 'CType');
/**
 * Prepare TCA for Custom Fluid Content Element
 */
$TCA['tt_content']['types']['tmplsub_lectures'] = $TCA['tt_content']['types']['table'];
$TCA['tt_content']['columns']['pi_flexform']['config']['ds']['*,tmplsub_lectures'] = 'FILE:EXT:css_styled_content/flexform_ds.xml';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', ['Lectures', 'tmplsub_lectures', 'content-image'], 'textmedia', 'after');
// mandatory fields for the backend
$TCA['be_users']['columns']['email']['config']['eval'] = 'trim,required';
$TCA['be_users']['columns']['realName']['config']['eval'] = 'trim,required';
$TCA['be_groups']['columns']['description']['config']['eval'] = 'required';
$TCA['be_groups']['columns']['lockToDomain']['config']['disabled'] = TRUE;
$TCA['tt_content']['columns']['header']['config']['eval'] = 'trim,required';
$TCA['tt_content']['columns']['altText']['config']['eval'] = 'trim,required';
$TCA['tt_content']['columns']['titleText']['config']['eval'] = 'trim,required';
$TCA['tt_content']['columns']['imagecaption']['config']['type'] = "input";
$TCA['tt_content']['columns']['imagecaption']['config']['eval'] = "trim,required";
$TCA['tt_content']['columns']['imagecaption']['config']['max'] = 256;
$TCA['pages']['columns']['categories']['config']['minitems'] = 1;
$TCA['pages']['columns']['categories']['config']['foreign_table_where'] = ' AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.title ASC';
$TCA['pages']['columns']['description']['config']['eval'] = 'required';
$TCA['pages_language_overlay']['columns']['description']['config']['eval'] = 'required';
コード例 #4
0
 /**
  * @test
  * @dataProvider addTcaSelectItemDataProvider
  * @param $relativeToField
  * @param $relativePosition
  * @param $expectedResultArray
  */
 public function addTcaSelectItemInsertsItemAtSpecifiedPosition($relativeToField, $relativePosition, $expectedResultArray)
 {
     $GLOBALS['TCA'] = array('testTable' => array('columns' => array('testField' => array('config' => array('items' => array('0' => array('firstElement'), '1' => array('matchMe'), 2 => array('thirdElement')))))));
     ExtensionManagementUtility::addTcaSelectItem('testTable', 'testField', array('insertedElement'), $relativeToField, $relativePosition);
     $this->assertEquals($expectedResultArray, $GLOBALS['TCA']['testTable']['columns']['testField']['config']['items']);
 }
コード例 #5
0
<?php

if (version_compare(TYPO3_branch, '6.2.99', '>')) {
    call_user_func(function ($extKey, $table) {
        $extRelPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extKey);
        $customPageIcon = $extRelPath . 'Resources/Public/Icons/doktype_icon.svg';
        $archiveDoktype = \JS\JsBmiCalculator\Controller\PageControllerInterface::DOKTYPE_RAW;
        // Add new page type as possible select item:
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem($table, 'doktype', ['LLL:EXT:js_bmi_calculator/Resources/Private/Language/locallang.xlf:pages.doktype', $archiveDoktype, $customPageIcon], '254', 'after');
        // Add icon for new page type:
        \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['pages'], ['ctrl' => ['typeicon_classes' => [$archiveDoktype => 'apps-pagetree-bmi']]]);
    }, 'js_bmi_calculator', 'pages');
}
コード例 #6
0
ファイル: tt_content.php プロジェクト: t3dd/T3DD16.Backend
<?php

defined('TYPO3_MODE') or die;
call_user_func(function () {
    $languageFilePrefix = 'LLL:EXT:t3dd16/Resources/Private/Language/Backend.xlf:';
    foreach (['card', 'price', 'fullwidthimage', 'sponsors'] as $item) {
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', [$languageFilePrefix . 'tt_content.' . $item . '.title', $item, 'content-textpic'], 'textmedia', 'after');
        $GLOBALS['TCA']['tt_content']['types'][$item] = $GLOBALS['TCA']['tt_content']['types']['textmedia'];
        $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'][$item] = 'mimetypes-x-content-text-media';
    }
    $GLOBALS['TCA']['tt_content']['palettes']['header'] = $GLOBALS['TCA']['tt_content']['palettes']['headers'];
});
コード例 #7
0
<?php

// load extConf
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['px_hybrid_auth']);
$supportedProviders = array();
foreach ($extConf['provider.'] as $provider => $config) {
    $provider = str_replace('.', '', $provider);
    if ((bool) $config['enabled']) {
        $supportedProviders[$provider] = TRUE;
    }
}
if (count($supportedProviders) > 0) {
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:px_hybrid_auth/Configuration/FlexForms/Login.xml', 'px_hybrid_auth_login');
} else {
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:px_hybrid_auth/Configuration/FlexForms/Error.xml', 'px_hybrid_auth_login');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:px_hybrid_auth/Resources/Private/Language/locallang_db.xlf:CType.I.px_hybrid_auth_login', 'px_hybrid_auth_login', 'EXT:px_hybrid_auth/Resources/Public/Icons/px_hybrid_auth_login_form.gif'), 'login', 'after');
$GLOBALS['TCA']['tt_content']['types']['px_hybrid_auth_login']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,' . '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,' . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.plugin,pi_flexform;;;;1-1-1,' . '--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.appearance,' . '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,' . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.behaviour,' . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended';
コード例 #8
0
ファイル: tt_content.php プロジェクト: hlop/TYPO3.CMS
<?php

defined('TYPO3_MODE') or die;
/**
 * Registering CType "media" and "multimedia"
 */
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['multimedia'] = 'mimetypes-x-content-multimedia';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['media'] = 'mimetypes-x-content-multimedia';
// Register new CType in item list just before "menu"
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.I.7', 'multimedia', 'content-special-media'), 'menu', 'before');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.I.18', 'media', 'content-special-media'), 'menu', 'before');
// Add new field
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', array('multimedia' => array('label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:multimedia', 'config' => array('type' => 'group', 'internal_type' => 'file', 'allowed' => 'txt,html,htm,class,swf,swa,dcr,wav,avi,au,mov,asf,mpg,wmv,mp3,mp4,m4v', 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'], 'uploadfolder' => 'uploads/media', 'size' => '2', 'maxitems' => '1', 'minitems' => '0'))));
// add type definition and palette
$GLOBALS['TCA']['tt_content']['types']['multimedia'] = array('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.media,
			--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.multimediafiles;multimediafiles,
		--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.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.extended');
$GLOBALS['TCA']['tt_content']['types']['media'] = array('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.media,
			pi_flexform,
		--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.access,
コード例 #9
0
}
if ($groupFound && $groupPosition) {
    // add the new CType item below CType
    array_splice($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'], $groupPosition + 1, 0, array(0 => $additionalCTypeItem));
} else {
    // nothing found, add two items (group + new CType) at the bottom of the list
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:CType.div.forms', '--div--'));
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', $additionalCTypeItem);
}
/**
 * CType "mailform"
 */
if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('form')) {
    $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['mailform'] = 'mimetypes-x-content-form';
    $GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['wizards']['forms'] = array('notNewRecords' => 1, 'enableByTypeConfig' => 1, 'type' => 'script', 'title' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:bodytext.W.forms', 'icon' => 'EXT:compatibility6/Resources/Public/Images/wizard_forms.gif', 'module' => array('name' => 'wizard_forms', 'urlParameters' => array('special' => 'formtype_mail')), 'params' => array('xmlOutput' => 0));
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:CType.I.8', 'mailform', 'content-elements-mailform'), 'search', 'before');
    // set up the fields
    $GLOBALS['TCA']['tt_content']['types']['mailform'] = array('showitem' => '
				--palette--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
				--palette--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
				bodytext;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:bodytext.ALT.mailform_formlabel,
			--div--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
				--palette--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames,
			--div--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
				--palette--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:palette.visibility;visibility,
				--palette--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
			--div--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:tabs.behaviour,
				--palette--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:palette.mailform;mailform,
			--div--;LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:tabs.extended');
    $baseDefaultExtrasOfBodytext = '';
    if (!empty($GLOBALS['TCA']['tt_content']['columns']['bodytext']['defaultExtras'])) {
コード例 #10
0
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$sliderColumns = array('tx_news_slideit_slider_teaser' => array('l10n_mode' => 'noCopy', 'label' => 'Spezieller Text für den Slider Teaser', 'config' => array('type' => 'text', 'cols' => 30, 'rows' => 5)), 'tx_news_slideit_slider_image' => array('label' => 'Spezielles Bild für den Slider Teaser', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('tx_news_slideit_slider_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;txMicroportalsImageOverlayPalette,
								--palette--;;filePalette'), \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array('showitem' => '
								--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;txMicroportalsImageOverlayPalette,
								--palette--;;filePalette'))), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'])), 'tx_news_slideit_display_news' => array('label' => 'Diese News anzeigen', 'config' => array('type' => 'group', 'internal_type' => 'db', 'allowed' => 'tx_news_domain_model_news', 'maxitems' => 1, 'wizards' => array('suggest' => array('type' => 'suggest')))));
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tx_news_domain_model_news', 'type', array('Externe News', 'tx_news_slideit_type_other'));
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_news_domain_model_news', '--div--;Spezieller Slider (optional),tx_news_slideit_slider_teaser,tx_news_slideit_slider_image', '', 'after:content_elements');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_news_domain_model_news', $sliderColumns);
$GLOBALS['TCA']['tx_news_domain_model_news']['types']['tx_news_slideit_type_other'] = array('showitem' => 'l10n_parent, l10n_diffsource,
			title;;paletteCoreWithoutTopNews,;;;;2-2-2, tx_news_slideit_display_news;;paletteNavtitle,;;;;3-3-3,

		--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
			--palette--;LLL:EXT:cms/locallang_ttc.xml:palette.access;paletteAccess,

		--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.extended,');
$GLOBALS['TCA']['tx_news_domain_model_news']['palettes']['paletteCoreWithoutTopNews'] = array('showitem' => 'type, sys_language_uid, hidden,', 'canNotCollapse' => FALSE);
unset($sliderColumns);
コード例 #11
0
            --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.media,
            assets,
            --palette--;LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:palette.alignment;mediablock,
            --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.imagelinks;imagelinks,
            --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.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.extended,
            rowDescription', 'columnsOverrides' => ['bodytext' => ['defaultExtras' => 'richtext:rte_transform[mode=ts_css]']]]);
/***************
 * Add Content Element: Image
 */
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['image'] = 'content-image';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', ['LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.I.3', 'image', 'content-image'], 'textmedia', 'after');
if (!is_array($GLOBALS['TCA']['tt_content']['types']['image'])) {
    $GLOBALS['TCA']['tt_content']['types']['image'] = [];
}
$GLOBALS['TCA']['tt_content']['types']['image'] = array_replace_recursive($GLOBALS['TCA']['tt_content']['types']['image'], ['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.images,
            image,
            --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.imagelinks;imagelinks,
            --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,
            --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.imageblock;imageblock,
            --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,
コード例 #12
0
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$ll = 'LLL:EXT:t3events_reservation/Resources/Private/Language/locallang_db.xlf:';
$tmpColumns = ['reservation' => ['label' => $ll . 'tx_t3events_domain_model_person.reservation', 'config' => ['type' => 'select', 'foreign_table' => 'tx_t3eventsreservation_domain_model_reservation', 'maxitems' => 1, 'minitems' => 1, 'readOnly' => 1]], 'birthplace' => ['label' => $ll . 'tx_t3events_domain_model_person.birthplace', 'config' => ['type' => 'input']], 'role' => ['label' => $ll . 'tx_t3events_domain_model_person.role', 'config' => ['type' => 'input']], 'company_name' => ['label' => $ll . 'tx_t3events_domain_model_person.company_name', 'config' => ['type' => 'input']], 'vat_id' => ['exclude' => 1, 'label' => $ll . 'tx_t3events_domain_model_person.vat_id', 'config' => ['type' => 'input', 'size' => 30, 'eval' => 'trim']], 'accounting_office' => ['exclude' => 1, 'label' => $ll . 'tx_t3events_domain_model_person.accounting_office', 'config' => ['type' => 'input', 'size' => 30, 'eval' => 'trim']]];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tx_t3events_domain_model_person', 'tx_extbase_type', [$ll . 'tx_t3events_domain_model_person.type.participant', \CPSIT\T3eventsReservation\Domain\Model\Person::PERSON_TYPE_PARTICIPANT]);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tx_t3events_domain_model_person', 'tx_extbase_type', [$ll . 'tx_t3events_domain_model_person.type.billingAddress', \CPSIT\T3eventsReservation\Domain\Model\BillingAddress::PERSON_TYPE_BILLING_ADDRESS]);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_t3events_domain_model_person', $tmpColumns, TRUE);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_t3events_domain_model_person', 'reservation,birthplace,company_name,role', '', 'after:email');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_t3events_domain_model_person', 'vat_id', '', 'after:company_name');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_t3events_domain_model_person', 'accounting_office', '', 'after:vat_id');
コード例 #13
0
<?php

defined('TYPO3_MODE') or die;
call_user_func(function () {
    $languageFilePrefix = 'LLL:EXT:fluid_styled_content/Resources/Private/Language/Database.xlf:';
    $customLanguageFilePrefix = 'LLL:EXT:fluid_styled_slider/Resources/Private/Language/locallang_be.xlf:';
    $frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
    // Add the CType "fs_slider"
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', ['LLL:EXT:fluid_styled_slider/Resources/Private/Language/locallang_be.xlf:wizard.title', 'fs_slider', 'content-image'], 'textmedia', 'after');
    $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['fs_slider'] = $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['textmedia'];
    // Define what fields to display
    $GLOBALS['TCA']['tt_content']['types']['fs_slider'] = ['showitem' => '
                --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
                --palette--;' . $languageFilePrefix . 'tt_content.palette.mediaAdjustments;mediaAdjustments,
                pi_flexform,
            --div--;' . $customLanguageFilePrefix . 'tca.tab.sliderElements,
                 assets
        ', 'columnsOverrides' => ['media' => ['label' => $languageFilePrefix . 'tt_content.media_references', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', ['appearance' => ['createNewRelationLinkTitle' => $languageFilePrefix . 'tt_content.media_references.addFileReference'], 'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types']], $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])]]];
});
コード例 #14
0
		pi_flexform;LLL:EXT:slickcarousel/Resources/Private/Language/be_locallang.xlf:settings,
	--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.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.extended
	--div--;Gridelements,
	    tx_gridelements_container,
        tx_gridelements_columns,
    ');
$GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds'][',slickcarousel'] = 'FILE:EXT:slickcarousel/Configuration/FlexForms/slick-responsive.xml';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['slickcarousel'] = 'slickicon';
// Slick Expert - END
// Slick Text - START
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', ['LLL:EXT:slickcarousel/Resources/Private/Language/be_locallang.xlf:slickcarouselbging.title', 'slickcarouselbgimg', 'EXT:slickcarousel/slick.svg'], '--div--', 'after');
$GLOBALS['TCA']['tt_content']['types']['slickcarouselbgimg'] = array('showitem' => '
        --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
		header;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header.ALT.div_formlabel,
		slickheight;LLL:EXT:slickcarousel/Resources/Private/Language/be_locallang.xlf:slickcarouselbging.height,
		tx_slickcarouselbgimg;LLL:EXT:slickcarousel/Resources/Private/Language/be_locallang.xlf:slickcarouselbging.title,
		--div--;LLL:EXT:slickcarousel/Resources/Private/Language/be_locallang.xlf:settings,
		pi_flexform;LLL:EXT:slickcarousel/Resources/Private/Language/be_locallang.xlf:settings,
	--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.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.extended
	--div--;Gridelements,
	    tx_gridelements_container,
コード例 #15
0
ファイル: tt_content.php プロジェクト: adrolli/TYPO3.CMS
<?php

defined('TYPO3_MODE') or die;
/**
 * Registering CType "media" and "multimedia"
 */
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['multimedia'] = 'mimetypes-x-content-multimedia';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['media'] = 'mimetypes-x-content-multimedia';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['multimedia'] = 'tt_content_mm.gif';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['media'] = 'tt_content_mm.gif';
// Register new CType in item list just before "menu"
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:cms/locallang_ttc.xlf:CType.I.7', 'multimedia', 'i/tt_content_mm.gif'), 'menu', 'before');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:cms/locallang_ttc.xlf:CType.I.18', 'media', 'i/tt_content_mm.gif'), 'menu', 'before');
// Add new field
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', array('multimedia' => array('label' => 'LLL:EXT:cms/locallang_ttc.xlf:multimedia', 'config' => array('type' => 'group', 'internal_type' => 'file', 'allowed' => 'txt,html,htm,class,swf,swa,dcr,wav,avi,au,mov,asf,mpg,wmv,mp3,mp4,m4v', 'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'], 'uploadfolder' => 'uploads/media', 'size' => '2', 'maxitems' => '1', 'minitems' => '0'))));
// add type definition and palette
$GLOBALS['TCA']['tt_content']['types']['multimedia'] = array('showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
			--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,
		--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.media,
			--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.multimediafiles;multimediafiles,
		--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');
$GLOBALS['TCA']['tt_content']['types']['media'] = array('showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
			--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,
		--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.media,
			pi_flexform,
		--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance,
コード例 #16
0
ファイル: ext_tables.php プロジェクト: maab127/default7
<?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');
コード例 #17
0
        bodytext;;;nowrap:wizards[table];' . $frontendLanguageFilePrefix . 'field.table.bodytext,
        --palette--;;tableconfiguration,
        table_caption,
    --div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
        layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
        --palette--;' . $frontendLanguageFilePrefix . 'palette.table_layout;tablelayout,
        --palette--;' . $frontendLanguageFilePrefix . 'palette.appearanceLinks;appearanceLinks,
    --div--;' . $frontendLanguageFilePrefix . 'tabs.access,
        hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
        --palette--;' . $frontendLanguageFilePrefix . 'palette.access;access,
    --div--;' . $frontendLanguageFilePrefix . 'tabs.extended
';
/******************************************
 * CE "Text & Media" (tt_content.textmedia)
 ******************************************/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array($languageFilePrefix . 'tt_content.CType.textmedia', 'textmedia', 'content-textpic'), 'header', 'after');
$GLOBALS['TCA']['tt_content']['columns']['CType']['config']['default'] = 'textmedia';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['textmedia'] = 'mimetypes-x-content-text-media';
$GLOBALS['TCA']['tt_content']['palettes']['mediaAdjustments'] = array('showitem' => '
        imagewidth;' . $languageFilePrefix . 'tt_content.palette.textmedia.imagewidth,
        imageheight;' . $languageFilePrefix . 'tt_content.palette.textmedia.imageheight,
        imageborder;' . $languageFilePrefix . 'tt_content.palette.textmedia.imageborder
    ');
$GLOBALS['TCA']['tt_content']['palettes']['gallerySettings'] = array('showitem' => '
        imageorient;' . $frontendLanguageFilePrefix . 'imageorient_formlabel,
        imagecols;' . $frontendLanguageFilePrefix . 'imagecols_formlabel
    ');
$GLOBALS['TCA']['tt_content']['types']['textmedia'] = array('showitem' => '
            --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
            --palette--;' . $frontendLanguageFilePrefix . 'palette.header;header,
            bodytext;' . $frontendLanguageFilePrefix . 'bodytext_formlabel;;richtext:rte_transform[mode=ts_css],
コード例 #18
0
  */
 $pluginSignatures = [0 => 'px_hybrid_auth_login'];
 foreach ($pluginSignatures as $pluginSignature) {
     $supportedProviders = [];
     foreach ($extConf['provider.'] as $provider => $config) {
         $provider = str_replace('.', '', $provider);
         if ((bool) $config['enabled']) {
             $supportedProviders[$provider] = TRUE;
         }
     }
     if (count($supportedProviders) > 0) {
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:px_hybrid_auth/Configuration/FlexForms/Login.xml', $pluginSignature);
     } else {
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:px_hybrid_auth/Configuration/FlexForms/Error.xml', $pluginSignature);
     }
     \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', [$languageFilePrefix . 'tt_content.CType.' . $pluginSignature, 'px_hybrid_auth_login', 'px-hybrid-auth-login']);
     $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['default'] = $pluginSignature;
     $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'][$pluginSignature] = 'px-hybrid-auth-login';
     $GLOBALS['TCA']['tt_content']['types'][$pluginSignature] = ['showitem' => '
             --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
         --div--;' . $frontendLanguageFilePrefix . 'tabs.plugin,
             pi_flexform,
         --div--;' . $frontendLanguageFilePrefix . 'tabs.access,
             hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
             --palette--;' . $frontendLanguageFilePrefix . 'palette.access;access,
         --div--;' . $frontendLanguageFilePrefix . 'tabs.extended
     '];
     // Add category tab when categories column exits
     if (!empty($GLOBALS['TCA']['tt_content']['columns']['categories'])) {
         $GLOBALS['TCA']['tt_content']['types'][$pluginSignature]['showitem'] .= ',--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,
             categories';
コード例 #19
0
ファイル: tt_content.php プロジェクト: khanhdeux/typo3test
<?php

defined('TYPO3_MODE') or die;
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:felogin/flexform.xml', 'login');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:cms/locallang_ttc.xlf:CType.I.10', 'login', 'i/tt_content_login.gif'), 'mailform', 'after');
$GLOBALS['TCA']['tt_content']['types']['login']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,' . '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,' . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.plugin,pi_flexform;;;;1-1-1,' . '--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.appearance,' . '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,' . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.behaviour,' . '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended';
コード例 #20
0
ファイル: tt_content.php プロジェクト: arnekolja/krbu_ce
<?php

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', ['LLL:EXT:krbu_ce/Resources/Private/Language/TCA.xlf:krbuce_demo', 'krbuce_demo', 'krbuce_demo.gif'], 'html', 'after');
$GLOBALS['TCA']['tt_content']['types']['krbuce_demo'] = array('showitem' => '
        --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.general;general,
        --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.header;header,
     --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.appearance,
        --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.frames;frames,
     --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
        --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.visibility;visibility,
        --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.access;access,
     --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.extended
');
コード例 #21
0
ファイル: fe_users.php プロジェクト: steffmeister/typo3-forum
<?php

$lllPath = 'LLL:EXT:typo3_forum/Resources/Private/Language/locallang_db.xml:fe_users.';
$tempColumns = ['crdate' => ['exclude' => 1, 'config' => ['type' => 'passthrough']], 'is_online' => ['exclude' => 1, 'config' => ['type' => 'passthrough']], 'disable' => ['exclude' => 1, 'config' => ['type' => 'passthrough']], 'date_of_birth' => ['exclude' => 1, 'config' => ['type' => 'passthrough']], 'tx_typo3forum_rank' => ['label' => 'LLL:EXT:typo3_forum/Resources/Private/Language/locallang_db.xml:tx_typo3forum_domain_model_user_rank', 'config' => ['type' => 'select', 'foreign_table' => 'tx_typo3forum_domain_model_user_rank', 'foreign_class' => '\\Mittwald\\Typo3Forum\\Domain\\Model\\User\\Rank', 'maxitems' => 1]], 'tx_typo3forum_points' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_points', 'config' => ['type' => 'none']], 'tx_typo3forum_post_count' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_post_count', 'config' => ['type' => 'none']], 'tx_typo3forum_post_count_session' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_post_count_session', 'config' => ['type' => 'none']], 'tx_typo3forum_topic_count' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_topic_count', 'config' => ['type' => 'none']], 'tx_typo3forum_helpful_count' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_helpful_count', 'config' => ['type' => 'none']], 'tx_typo3forum_helpful_count_session' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_helpful_count_session', 'config' => ['type' => 'none']], 'tx_typo3forum_question_count' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_question_count', 'config' => ['type' => 'none']], 'tx_typo3forum_topic_favsubscriptions' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_topic_favsubscriptions', 'config' => ['type' => 'select', 'foreign_table' => 'tx_typo3forum_domain_model_forum_topic', 'MM' => 'tx_typo3forum_domain_model_user_topicfavsubscription', 'multiple' => TRUE, 'maxitems' => 9999, 'minitems' => 0]], 'tx_typo3forum_topic_subscriptions' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_topic_subscriptions', 'config' => ['type' => 'select', 'foreign_table' => 'tx_typo3forum_domain_model_forum_topic', 'MM' => 'tx_typo3forum_domain_model_user_topicsubscription', 'multiple' => TRUE, 'maxitems' => 9999, 'minitems' => 0]], 'tx_typo3forum_forum_subscriptions' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_forum_subscriptions', 'config' => ['type' => 'select', 'foreign_table' => 'tx_typo3forum_domain_model_forum_forum', 'MM' => 'tx_typo3forum_domain_model_user_forumsubscription', 'multiple' => TRUE, 'maxitems' => 9999, 'minitems' => 0]], 'tx_typo3forum_signature' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_signature', 'config' => ['type' => 'text']], 'tx_typo3forum_interests' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_interests', 'config' => ['type' => 'text']], 'tx_typo3forum_userfield_values' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_userfield_values', 'config' => ['type' => 'inline', 'foreign_table' => 'tx_typo3forum_domain_model_user_userfield_value', 'foreign_field' => 'user', 'maxitems' => 9999, 'appearance' => ['collapse' => 0, 'newRecordLinkPosition' => 'bottom']]], 'tx_typo3forum_read_forum' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_read_forum', 'config' => ['type' => 'group', 'foreign_table' => 'tx_typo3forum_domain_model_forum_forum', 'MM' => 'tx_typo3forum_domain_model_user_readforum', 'multiple' => TRUE, 'minitems' => 0]], 'tx_typo3forum_read_topics' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_read_topics', 'config' => ['type' => 'group', 'foreign_table' => 'tx_typo3forum_domain_model_forum_topic', 'MM' => 'tx_typo3forum_domain_model_user_readtopic', 'multiple' => TRUE, 'minitems' => 0]], 'tx_typo3forum_support_posts' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_support_posts', 'config' => ['type' => 'select', 'foreign_table' => 'tx_typo3forum_domain_model_forum_post', 'MM' => 'tx_typo3forum_domain_model_user_supportpost', 'multiple' => TRUE, 'minitems' => 0]], 'tx_typo3forum_use_gravatar' => ['label' => $lllPath . 'use_gravatar', 'config' => ['type' => 'check']], 'tx_typo3forum_contact' => ['label' => $lllPath . 'contact', 'config' => ['type' => 'none']], 'tx_typo3forum_facebook' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_facebook', 'config' => ['type' => 'input', 'size' => '255']], 'tx_typo3forum_twitter' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_twitter', 'config' => ['type' => 'input', 'size' => '255']], 'tx_typo3forum_google' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_google', 'config' => ['type' => 'input', 'size' => '255']], 'tx_typo3forum_skype' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_skype', 'config' => ['type' => 'input', 'size' => '255']], 'tx_typo3forum_job' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_job', 'config' => ['type' => 'input', 'size' => '255']], 'tx_typo3forum_working_environment' => ['exclude' => 1, 'label' => $lllPath . 'tx_typo3forum_working_environment', 'config' => ['type' => 'select', 'items' => [['LLL:EXT:typo3_forum/Resources/Private/Language/locallang.xml:Working_Environment_0', 0], ['LLL:EXT:typo3_forum/Resources/Private/Language/locallang.xml:Working_Environment_1', 1], ['LLL:EXT:typo3_forum/Resources/Private/Language/locallang.xml:Working_Environment_2', 2], ['LLL:EXT:typo3_forum/Resources/Private/Language/locallang.xml:Working_Environment_3', 3], ['LLL:EXT:typo3_forum/Resources/Private/Language/locallang.xml:Working_Environment_4', 4]], 'default' => 0]], 'tx_typo3forum_private_messages' => ['exclude' => 1, 'label' => 'LLL:EXT:typo3_forum/Resources/Private/Language/locallang_db.xml:tx_typo3forum_domain_model_user_pm', 'config' => ['type' => 'inline', 'foreign_table' => 'tx_typo3forum_domain_model_user_privatemessage', 'foreign_field' => 'feuser', 'maxitems' => 9999, 'appearance' => ['collapseAll' => 1, 'newRecordLinkPosition' => 'bottom', 'expandSingle' => 1]]]];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns, 1);
$GLOBALS['TCA']['fe_users']['types']['Mittwald\\Typo3Forum\\Domain\\Model\\User\\FrontendUser'] = $GLOBALS['TCA']['fe_users']['types']['0'];
$GLOBALS['TCA']['fe_users']['types']['Mittwald\\Typo3Forum\\Domain\\Model\\User\\FrontendUser']['showitem'] .= ',--div--;LLL:EXT:typo3_forum/Resources/Private/Language/locallang_db.xml:fe_users.tx_typo3forum.tab.settings,' . ' tx_typo3forum_points, tx_typo3forum_post_count, tx_typo3forum_topic_count, tx_typo3forum_helpful_count, tx_typo3forum_question_count, tx_typo3forum_rank,' . ' tx_typo3forum_signature, tx_typo3forum_userfield_values, tx_typo3forum_use_gravatar, tx_typo3forum_contact, tx_typo3forum_working_environment, tx_typo3forum_private_messages, tx_typo3forum_post_count_session, tx_typo3forum_helpful_count_session';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('fe_users', 'tx_extbase_type', [$lllPath . 'tx_extbase_type.typo3_forum', 'Mittwald\\Typo3Forum\\Domain\\Model\\User\\FrontendUser']);
コード例 #22
0
ファイル: tt_content.php プロジェクト: plan2net/TYPO3.CMS
if ($groupFound && $groupPosition) {
    // add the new CType item below CType
    array_splice($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'], $groupPosition + 1, 0, array(0 => $additionalCTypeItem));
} else {
    // nothing found, add two items (group + new CType) at the bottom of the list
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.div.forms', '--div--'));
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', $additionalCTypeItem);
}
/**
 * CType "mailform"
 */
if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('form')) {
    $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['mailform'] = 'mimetypes-x-content-form';
    $GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['mailform'] = 'tt_content_form.gif';
    $GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['wizards']['forms'] = array('notNewRecords' => 1, 'enableByTypeConfig' => 1, 'type' => 'script', 'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.W.forms', 'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_forms.gif', 'module' => array('name' => 'wizard_forms', 'urlParameters' => array('special' => 'formtype_mail')), 'params' => array('xmlOutput' => 0));
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.I.8', 'mailform', 'i/tt_content_form.gif'), 'search', 'before');
}
// set up the fields
$GLOBALS['TCA']['tt_content']['types']['mailform'] = array('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,
		bodytext;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.ALT.mailform_formlabel,
	--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.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.behaviour,
		--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.mailform;mailform,
	--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended');
$baseDefaultExtrasOfBodytext = '';
        					event_location,status,
					--div--;' . $ll . 'label.tab.price,
						price,free_of_charge,price_notice,
					--div--;' . $ll . 'label.tab.registration,
						--palette--;;paletteLessonRegistration,places,registration_remarks,
						registration_documents,external_registration_link,
					--div--;' . $ll . 'label.tab.participants,
						participants,
					--div--;Access,
					tx_extbase_type,hidden,starttime, endtime';
$GLOBALS['TCA']['tx_t3events_domain_model_performance']['types'][$extbaseType]['showitem'] = $scheduleShowItems;
$temporaryColumns = ['participants' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventsreservation_domain_model_performance.participants', 'config' => ['type' => 'inline', 'foreign_table' => 'tx_t3events_domain_model_person', 'MM' => 'tx_t3eventsreservation_performance_participants_person_mm', 'appearance' => ['levelLinksPosition' => 'none', 'enabledControls' => ['info' => FALSE, 'new' => FALSE, 'dragdrop' => FALSE, 'sort' => FALSE, 'hide' => FALSE, 'delete' => FALSE, 'localize' => FALSE]]]], 'deadline' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventsreservation_domain_model_performance.deadline', 'config' => ['type' => 'input', 'size' => 7, 'eval' => 'date', 'checkbox' => 1, 'default' => time()]], 'registration_begin' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventsreservation_domain_model_performance.registration_begin', 'config' => ['type' => 'input', 'size' => 7, 'eval' => 'date', 'checkbox' => 1]], 'price' => ['exclude' => 0, 'label' => 'LLL:EXT:t3events/Resources/Private/Language/locallang_db.xml:tx_t3events_domain_model_ticketclass.price', 'config' => ['type' => 'input', 'size' => 30, 'eval' => 'double2']], 'places' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventsreservation_domain_model_performance.places', 'config' => ['type' => 'input', 'size' => 4, 'eval' => 'int']], 'free_of_charge' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventsreservation_domain_model_performance.free_of_charge', 'config' => ['type' => 'check', 'default' => '0']], 'registration_remarks' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventsreservation_domain_model_performance.registration_remarks', 'config' => ['type' => 'text', 'cols' => 40, 'rows' => 5, 'eval' => 'trim']], 'external_registration_link' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventsreservation_domain_model_performance.external_registration_link', 'config' => ['type' => 'input', 'size' => 30, 'eval' => 'trim']], 'registration_documents' => ['label' => $ll . 'tx_t3eventsreservation_domain_model_performance.registration_documents', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('registration_documents', ['appearance' => ['headerThumbnail' => ['width' => '100', 'height' => '100'], 'createNewRelationLinkTitle' => $ll . 'label.addDocument'], 'foreign_types' => ['0' => ['showitem' => '
						--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
						--palette--;;filePalette'], \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => ['showitem' => '
						--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
						--palette--;;filePalette'], \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => ['showitem' => '
						--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
						--palette--;;filePalette'], \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => ['showitem' => '
						--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
						--palette--;;filePalette']]], 'doc,docx,pdf')]];
// add type field if missing
if (!isset($GLOBALS['TCA']['tx_t3events_domain_model_performance']['columns']['tx_extbase_type'])) {
    $temporaryColumns['tx_extbase_type'] = ['config' => ['label' => $ll . 'label.tx_extbase_type', 'type' => 'select', 'items' => [[$ll . 'label.tx_extbase_type.default', '0'], [$ll . 'label.tx_extbase_type.Tx_T3eventsReservation_Schedule', $extbaseType]]]];
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_t3events_domain_model_performance', 'tx_extbase_type', '', 'before:hidden');
} else {
    // add type item
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tx_t3events_domain_model_performance', 'tx_extbase_type', [$ll . 'label.tx_extbase_type.Tx_T3eventsReservation_Schedule', $extbaseType]);
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_t3events_domain_model_performance', $temporaryColumns, TRUE);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_t3events_domain_model_performance', 'price', '', 'before:price_notice');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_t3events_domain_model_performance', 'tx_extbase_type', '', 'before:hidden');
コード例 #24
0
ファイル: tt_content.php プロジェクト: dcngmbh/moox_core
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('Textpic', 'textpic', 'content-textpic'), 'header', 'after');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('Media', 'media', 'content-textpic'), 'textpic', 'after');
$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'] = array_merge($GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'], array('image' => 'mimetypes-x-content-image', 'text' => 'mimetypes-x-content-text'));
if (TRUE === isset($GLOBALS['TCA']['tt_content']['ctrl']['typeicons'])) {
    $GLOBALS['TCA']['tt_content']['ctrl']['typeicons'] = array_merge($GLOBALS['TCA']['tt_content']['ctrl']['typeicons'], array('image' => 'tt_content_image.gif', 'text' => 'tt_content.gif'));
}
array_splice($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'], 2, 0, array(array('LLL:EXT:cms/locallang_ttc.xlf:CType.I.1', 'text', 'i/tt_content.gif'), array('LLL:EXT:cms/locallang_ttc.xlf:CType.I.3', 'image', 'i/tt_content_image.gif')));
$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] .= ',ogv';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['fileExtensionToMimeType']['ogv'] = 'video/ogg';
$additionalColumns = array('assets' => array('label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.asset_references', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('assets', array('appearance' => array('createNewRelationLinkTitle' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.asset_references.addFileReference'), 'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types']), $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])), 'tx_mooxcore_hide_desktop' => array('exclude' => 1, 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_desktop', 'config' => array('type' => 'check')), 'tx_mooxcore_hide_laptop' => array('exclude' => 1, 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_laptop', 'config' => array('type' => 'check')), 'tx_mooxcore_hide_tablet' => array('exclude' => 1, 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_tablet', 'config' => array('type' => 'check')), 'tx_mooxcore_hide_phone' => array('exclude' => 1, 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_phone', 'config' => array('type' => 'check')), 'tx_mooxcore_hide_print' => array('exclude' => 1, 'label' => 'LLL:EXT:moox_core/Resources/Private/Language/Database.xlf:tt_content.tx_mooxcore_hide_print', 'config' => array('type' => 'check')));
$GLOBALS['TCA']['tt_content']['palettes'] = array_replace($GLOBALS['TCA']['tt_content']['palettes'], array('10' => array('showitem' => '
                                table_bgColor,
                                table_border,
                                table_cellspacing,
                                table_cellpadding
                        '), 'header' => array('showitem' => '
                                header;LLL:EXT:cms/locallang_ttc.xlf:header_formlabel,
                                --linebreak--,
                                header_layout;LLL:EXT:cms/locallang_ttc.xlf:header_layout_formlabel,
                                header_position;LLL:EXT:cms/locallang_ttc.xlf:header_position_formlabel,
                                date;LLL:EXT:cms/locallang_ttc.xlf:date_formlabel,
                                --linebreak--,
                                header_link;LLL:EXT:cms/locallang_ttc.xlf:header_link_formlabel
                        ', 'canNotCollapse' => 1), 'headers' => array('showitem' => '
                                header;LLL:EXT:cms/locallang_ttc.xlf:header_formlabel,
                                --linebreak--,
コード例 #25
0
<?php

defined('TYPO3_MODE') or die;
call_user_func(function () {
    $frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
    // Add the CType "fs_code_snippet"
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', ['Code Snippet', 'fs_code_snippet', 'fs-code-snippet'], 'list', 'after');
    // Add the column programming_language too tt_content
    $newColumn = ['programming_language' => ['exclude' => true, 'label' => 'Programming Language', 'config' => ['type' => 'select', 'renderType' => 'selectSingle', 'items' => [['None', \TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_MIXED], ['Apache Config', \DanielGoerz\FsCodeSnippet\Enumeration\CodeSnippetLanguage::APACHE_CONFIGURATION], ['Bash', \DanielGoerz\FsCodeSnippet\Enumeration\CodeSnippetLanguage::BASH], ['Command-line', \DanielGoerz\FsCodeSnippet\Enumeration\CodeSnippetLanguage::COMMANDLINE], ['CSS', \TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_CSS], ['HTML', \TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_HTML], ['JavaScript', \TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_JAVASCRIPT], ['JSON', \DanielGoerz\FsCodeSnippet\Enumeration\CodeSnippetLanguage::JSON], ['PHP', \TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_PHP], ['Typoscript', \TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_TYPOSCRIPT], ['XML', \TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_XML]], 'default' => \TYPO3\CMS\T3editor\Form\Element\T3editorElement::MODE_MIXED]]];
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $newColumn);
    // Reload on change
    $GLOBALS['TCA']['tt_content']['ctrl']['requestUpdate'] .= ',programming_language';
    // Use type icon
    $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['fs_code_snippet'] = 'fs-code-snippet';
    // What fields should be displayed
    $GLOBALS['TCA']['tt_content']['types']['fs_code_snippet'] = ['showitem' => '
            --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
            --palette--;' . $frontendLanguageFilePrefix . 'palette.header;header,
            programming_language,pi_flexform,
            bodytext,
            --div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
				layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
				--palette--;' . $frontendLanguageFilePrefix . 'palette.appearanceLinks;appearanceLinks,
            --div--;' . $frontendLanguageFilePrefix . 'tabs.access,
                hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
                --palette--;' . $frontendLanguageFilePrefix . 'palette.access;access,
        '];
    // Overwrite behavior of bodytext and pi_flexform for fs_code_snippet
    $GLOBALS['TCA']['tt_content']['types']['fs_code_snippet']['columnsOverrides'] = ['bodytext' => ['label' => 'Code Snippet', 'config' => ['type' => 'text', 'renderType' => 'fs_code_snippet', 'format' => 'html', 'rows' => 20]], 'pi_flexform' => ['label' => 'Command-line options', 'displayCond' => 'FIELD:programming_language:=:' . \DanielGoerz\FsCodeSnippet\Enumeration\CodeSnippetLanguage::COMMANDLINE]];
    // Add a flexform to the fs_code_snippet CType
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('', 'FILE:EXT:fs_code_snippet/Configuration/FlexForms/fs_code_snippet_flexform.xml', 'fs_code_snippet');
コード例 #26
0
ファイル: tt_content.php プロジェクト: dkd/theme_t3kit
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', [$contentElementLanguageFilePrefix . 'iconTextButton.title', 'iconTextButton', 'content-elements-iconTextButton'], 'bigIconTextButton', 'after');
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['iconTextButton'] = 'content-elements-iconTextButton';
 // "imageTextLink"
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', [$contentElementLanguageFilePrefix . 'imageTextLink.title', 'imageTextLink', 'content-elements-imageTextLink'], 'iconTextButton', 'after');
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['imageTextLink'] = 'content-elements-imageTextLink';
 // "logoCarousel"
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', [$contentElementLanguageFilePrefix . 'logoCarousel.title', 'logoCarousel', 'content-elements-logoCarousel'], 'imageTextLink', 'after');
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['logoCarousel'] = 'content-elements-logoCarousel';
 // "quote"
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', [$contentElementLanguageFilePrefix . 'quote.title', 'quote', 'content-elements-quote'], 'logoCarousel', 'after');
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['quote'] = 'content-elements-quote';
 // "tabs"
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', [$contentElementLanguageFilePrefix . 'tabs.title', 'tabs', 'content-elements-tabs'], 'quote', 'after');
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['tabs'] = 'content-elements-tabs';
 // The "divider" these content elements
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', [$contentElementLanguageFilePrefix . 'tab.contentElements', '--div--', null], 'login', 'after');
 //
 // Palettes
 //
 // "imageSize"
 $GLOBALS['TCA']['tt_content']['palettes']['imageSize'] = ['showitem' => '
         imagewidth;' . $contentElementLanguageFilePrefix . 'tt_content.palette.imageSize.imageWidth,
         imageheight;' . $contentElementLanguageFilePrefix . 'tt_content.palette.imageSize.imageHeight,
     '];
 // "imageMaxSize"
 $GLOBALS['TCA']['tt_content']['palettes']['imageMaxSize'] = ['showitem' => '
         imagewidth;' . $contentElementLanguageFilePrefix . 'tt_content.palette.imageSize.imageMaxWidth,
         imageheight;' . $contentElementLanguageFilePrefix . 'tt_content.palette.imageSize.imageMaxHeight,
     '];
 //
 // Types
コード例 #27
0
ファイル: tt_content.php プロジェクト: rickymathew/TYPO3.CMS
$groupFound = false;
$groupPosition = false;
foreach ($existingCTypeItems as $position => $item) {
    if ($item[0] === 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.div.forms') {
        $groupFound = true;
        $groupPosition = $position;
        break;
    }
}
if ($groupFound && $groupPosition) {
    // add the new CType item below CType
    array_splice($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'], $groupPosition + 1, 0, array(0 => $additionalCTypeItem));
} else {
    // nothing found, add two items (group + new CType) at the bottom of the list
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.div.forms', '--div--'));
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', $additionalCTypeItem);
}
$GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['wizards']['forms'] = array('notNewRecords' => 1, 'enableByTypeConfig' => 1, 'type' => 'script', 'title' => 'Form wizard', 'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_forms.gif', 'module' => array('name' => 'wizard_form'), 'params' => array('xmlOutput' => 0));
// Add palettes if they are not available
if (!isset($GLOBALS['TCA']['tt_content']['palettes']['visibility'])) {
    $GLOBALS['TCA']['tt_content']['palettes']['visibility'] = array('showitem' => '
            hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:hidden_formlabel,
            sectionIndex;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:sectionIndex_formlabel,
            linkToTop;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:linkToTop_formlabel
        ');
}
if (!isset($GLOBALS['TCA']['tt_content']['palettes']['frames'])) {
    $GLOBALS['TCA']['tt_content']['palettes']['frames'] = array('showitem' => '
            layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel
        ');
}
コード例 #28
0
ファイル: tt_content.php プロジェクト: mmunz/c1_fsc_video
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
// c1_fsc_video
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', ['LLL:EXT:c1_fsc_video/Resources/Private/Language/TCA.xlf:c1_fsc_video', 'c1_fsc_video', 'c1_fsc_video'], 'html', 'after');
$GLOBALS['TCA']['tt_content']['types']['c1_fsc_video'] = array('showitem' => '
        --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
        --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,
        assets,
        image;LLL:EXT:c1_fsc_video/Resources/Private/Language/TCA.xlf:c1_fsc_video_preview_image,
     --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
', 'columnsOverrides' => array('assets' => array('config' => array('minitems' => 1, 'maxitems' => 1, 'foreign_selector_fieldTcaOverride' => array('config' => array('appearance' => array('elementBrowserType' => 'file', 'elementBrowserAllowed' => 'youtube,vimeo'))))), 'image' => array('config' => array('minitems' => 0, 'maxitems' => 1, 'foreign_selector_fieldTcaOverride' => array('config' => array('appearance' => array('elementBrowserType' => 'file', 'elementBrowserAllowed' => 'jpg,jpeg,png')))))));
コード例 #29
0
<?php

$ll = 'LLL:EXT:t3events_course/Resources/Private/Language/locallang_db.xlf:';
$GLOBALS['TCA']['tx_t3events_domain_model_event']['ctrl']['type'] = 'tx_extbase_type';
$extbaseType = 'Tx_T3eventsCourse_Course';
//show items for type course
$courseShowItems = '
							event_type,headline,subtitle,teaser,genre,description,goals,requirements,
							mode_instruction_form,
						--div--;' . $ll . 'tab.relations,
							audience,certificate,certificate_desc,course_contacts,contact_person,keywords,
						--div--;' . $ll . 'tab.images,
							image,
						--div--;' . $ll . 'tab.performances,
							performances;' . $ll . 'tx_t3eventscourse_domain_model_event.performances,
						--div--;' . $ll . 'tab.exam_degree,
							exam_costs,exam_remarks,degree_type,certificate,
						--div--;' . $ll . 'tab.visibility,
							tx_extbase_type,hidden,starttime,endtime,new_until,archive_date,fe_group';
$GLOBALS['TCA']['tx_t3events_domain_model_event']['types'][$extbaseType]['showitem'] = $courseShowItems;
$temporaryColumns = ['requirements' => ['exclude' => 0, 'label' => $ll . 'tx_t3eventscourse_domain_model_event.requirements', 'config' => ['type' => 'text', 'cols' => 32, 'rows' => 10, 'eval' => 'trim'], 'defaultExtras' => 'richtext[]'], 'exam_costs' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventscourse_domain_model_event.exam_costs', 'config' => ['type' => 'input', 'size' => 30, 'eval' => 'double2']], 'exam_remarks' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventscourse_domain_model_event.exam_remarks', 'config' => ['type' => 'text', 'cols' => 40, 'rows' => 5, 'eval' => 'trim']], 'degree_type' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventscourse_domain_model_event.degree_type', 'config' => ['type' => 'select', 'items' => [[$ll . 'tx_t3eventscourse_domain_model_event.degree_type.0', 0], [$ll . 'tx_t3eventscourse_domain_model_event.degree_type.1', 1], [$ll . 'tx_t3eventscourse_domain_model_event.degree_type.2', 2], [$ll . 'tx_t3eventscourse_domain_model_event.degree_type.3', 3], [$ll . 'tx_t3eventscourse_domain_model_event.degree_type.4', 4]]]], 'mode_instruction_form' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form', 'config' => ['type' => 'select', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, 'items' => [[$ll . '', '--div--'], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.6', 6], [$ll . '', '--div--'], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.1', 1], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.103', 103], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.104', 104], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.105', 105], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.106', 106], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.107', 107], [$ll . '', '--div--'], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.2', 2], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.3', 3], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.11', 11], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.15', 15], [$ll . '', '--div--'], [$ll . 'tx_t3eventscourse_domain_model_event.mode_instruction_form.4', 4]], 'noIconsBelowSelect' => 1]], 'certificate' => ['exclude' => 1, 'label' => $ll . 'tx_t3eventscourse_domain_model_event.certificate', 'config' => ['type' => 'select', 'size' => 6, 'minitems' => 0, 'maxitems' => 1000, 'foreign_table' => 'tx_t3eventscourse_domain_model_certificate', 'foreign_table_where' => 'AND tx_t3eventscourse_domain_model_certificate.sys_language_uid IN (-1,0)']]];
// add type field if missing
if (!isset($GLOBALS['TCA']['tx_t3events_domain_model_event']['columns']['tx_extbase_type'])) {
    $temporaryColumns['tx_extbase_type'] = ['config' => ['label' => $ll . 'tx_t3events_domain_model_event.tx_extbase_type', 'type' => 'select', 'items' => [[$ll . 'label.tx_extbase_type.default', ''], [$ll . 'label.tx_extbase_type.Tx_T3eventsCourse_Course', $extbaseType]]]];
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tx_t3events_domain_model_event', 'tx_extbase_type', '', 'before:hidden');
} else {
    // add type item
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tx_t3events_domain_model_event', 'tx_extbase_type', [$ll . 'label.tx_extbase_type.Tx_T3eventsCourse_Course', $extbaseType]);
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_t3events_domain_model_event', $temporaryColumns);
コード例 #30
0
ファイル: demo_fsc.php プロジェクト: edekowalski/demo_fsc
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$_EXTKEY = $GLOBALS['_EXTKEY'] = 'demo_fsc';
// Adds the content element to the "Type" dropdown
ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array('LLL:EXT:demo_fsc/Resources/Private/Language/Tca.xlf:demo_fsc', $_EXTKEY, 'content-plugin'), 'textmedia', 'after');
// Configure the default backend fields for the content element
$GLOBALS['TCA']['tt_content']['types']['demo_fsc'] = array('showitem' => '
				--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.general;general,
				--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.header;header,
			--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:tabs.appearance,
				--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.frames;frames,
			--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:tabs.access,
				--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.visibility;visibility,
				--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.access;access,
			--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:tabs.extended
');
// Add an entry in the static template list found in sys_templates for static TS
ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'FSC Demo Content Element');