当前位置: 首页>>代码示例>>PHP>>正文


PHP ExtensionManagementUtility::loadNewTcaColumnsConfigFiles方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP ExtensionManagementUtility::loadNewTcaColumnsConfigFiles方法的具体用法?PHP ExtensionManagementUtility::loadNewTcaColumnsConfigFiles怎么用?PHP ExtensionManagementUtility::loadNewTcaColumnsConfigFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Core\Utility\ExtensionManagementUtility的用法示例。


在下文中一共展示了ExtensionManagementUtility::loadNewTcaColumnsConfigFiles方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add

 /**
  * Adds a new token configuration to this registry.
  * TCA changes are directly applied
  *
  * @param string $extensionKey Extension key to be used
  * @param string $tableName Name of the table to be registered
  * @param string $tokenField Name of the field to be registered
  * @param array $options Additional configuration options
  *              + fieldList: field configuration to be added to showitems
  *              + typesList: list of types that shall visualize the token field
  *              + position: insert position of the token field
  *              + label: backend label of the token field
  *              + fieldConfiguration: TCA field config array to override defaults
  * @return bool
  */
 public function add($extensionKey, $tableName, $tokenField = 'token', array $options = [])
 {
     $didRegister = FALSE;
     if (empty($tableName) || !is_string($tableName)) {
         throw new \InvalidArgumentException('No or invalid table name "' . $tableName . '" given.', 1369122038);
     }
     if (!$this->isRegistered($tableName, $tokenField)) {
         $this->registry[$tableName][$tokenField] = $options;
         $this->extensions[$extensionKey][$tableName]['tokenField'][$tokenField] = $tokenField;
         if (!isset($GLOBALS['TCA'][$tableName]['columns']) && isset($GLOBALS['TCA'][$tableName]['ctrl']['dynamicConfigFile'])) {
             // Handle deprecated old style dynamic TCA column loading.
             ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
         }
         if (isset($GLOBALS['TCA'][$tableName]['columns'])) {
             $this->applyTcaForTableAndField($tableName, $tokenField);
             $didRegister = TRUE;
         }
     }
     return $didRegister;
 }
开发者ID:Ecodev,项目名称:formule,代码行数:35,代码来源:TokenRegistry.php

示例2: loadNewTcaColumnsConfigFilesDoesNotIncludeFileIfColumnsExist

 /**
  * @test
  */
 public function loadNewTcaColumnsConfigFilesDoesNotIncludeFileIfColumnsExist()
 {
     $GLOBALS['TCA'] = array('test' => array('ctrl' => array('dynamicConfigFile' => __DIR__ . '/Fixtures/RuntimeException.php'), 'columns' => array('foo' => 'bar')));
     ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:8,代码来源:ExtensionManagementUtilityTest.php

示例3: die

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
if (TYPO3_MODE === 'BE') {
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction('web_func', 'TYPO3\\CMS\\WizardSortpages\\View\\SortPagesWizardModuleFunction', NULL, 'LLL:EXT:wizard_sortpages/locallang.xlf:wiz_sort', 'wiz');
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_func', 'EXT:wizard_sortpages/locallang_csh.xlf');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
/**
 * Extension: go_maps_ext
 * File: C:/xampp/htdocs/typo3_6.2.14/typo3conf/ext/go_maps_ext/ext_tables.php
 */
$_EXTKEY = 'go_maps_ext';
$_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY];
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('Clickstorm.' . $_EXTKEY, 'Show', 'Google Map');
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_show';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'code,layout,select_key,pages,recursive';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_show.xml');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Google Maps API Extbase');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_gomapsext_domain_model_address', 'EXT:go_maps_ext/Resources/Private/Language/locallang_csh_tx_gomapsext_domain_model_address.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_gomapsext_domain_model_address');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_gomapsext_domain_model_map', 'EXT:go_maps_ext/Resources/Private/Language/locallang_csh_tx_gomapsext_domain_model_map.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_gomapsext_domain_model_map');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_gomapsext_domain_model_category', 'EXT:go_maps_ext/Resources/Private/Language/locallang_csh_tx_gomapsext_domain_model_category.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_gomapsext_domain_model_category');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
#
开发者ID:KarlDennisMatthaei1923,项目名称:PierraaDesign,代码行数:31,代码来源:ext_tables_85b0b72e6c389a34572fa3532891d3a4ee21fec7.php

示例4: testEleminateNonTcaColumnsByTable

 /**
  *
  */
 public function testEleminateNonTcaColumnsByTable()
 {
     if (tx_rnbase_util_TYPO3::isTYPO60OrHigher()) {
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
     }
     $data = array('blacklisted' => true, 'whitelisted' => 0, 'ich-muss-raus' => true, 'ich-auch' => false);
     $res = tx_mklib_util_TCA::eleminateNonTcaColumnsByTable('tx_mklib_wordlist', $data);
     $this->assertEquals(2, count($res), 'falsche array größe');
     $this->assertTrue($res['blacklisted'], 'blacklsited Feld ist nicht korrekt!');
     $this->assertEquals(0, $res['whitelisted'], 'whitelisted Feld ist nicht korrekt!');
     $this->assertFalse(isset($res['ich-muss-raus']), 'ich-muss-raus Feld wurde nicht entfernt!');
     $this->assertFalse(isset($res['ich-auch']), 'ich-auch Feld wurde nicht entfernt!');
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:16,代码来源:class.tx_mklib_tests_util_TCA_testcase.php

示例5: add

 /**
  * Adds a new category configuration to this registry.
  * TCA changes are directly applied
  *
  * @param string $extensionKey Extension key to be used
  * @param string $tableName Name of the table to be registered
  * @param string $fieldName Name of the field to be registered
  * @param array $options Additional configuration options
  *              + fieldList: field configuration to be added to showitems
  *              + typesList: list of types that shall visualize the categories field
  *              + position: insert position of the categories field
  *              + label: backend label of the categories field
  *              + fieldConfiguration: TCA field config array to override defaults
  * @param bool $override If TRUE, any category configuration for the same table / field is removed before the new configuration is added
  * @return bool
  * @throws \InvalidArgumentException
  * @throws \RuntimeException
  */
 public function add($extensionKey, $tableName, $fieldName = 'categories', array $options = array(), $override = false)
 {
     $didRegister = false;
     if (empty($tableName) || !is_string($tableName)) {
         throw new \InvalidArgumentException('No or invalid table name "' . $tableName . '" given.', 1369122038);
     }
     if (empty($extensionKey) || !is_string($extensionKey)) {
         throw new \InvalidArgumentException('No or invalid extension key "' . $extensionKey . '" given.', 1397836158);
     }
     if ($override) {
         $this->remove($tableName, $fieldName);
     }
     if (!$this->isRegistered($tableName, $fieldName)) {
         $this->registry[$tableName][$fieldName] = $options;
         $this->extensions[$extensionKey][$tableName][$fieldName] = $fieldName;
         if (!isset($GLOBALS['TCA'][$tableName]['columns']) && isset($GLOBALS['TCA'][$tableName]['ctrl']['dynamicConfigFile'])) {
             // Handle deprecated old style dynamic TCA column loading.
             ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
         }
         if (isset($GLOBALS['TCA'][$tableName]['columns'])) {
             $this->applyTcaForTableAndField($tableName, $fieldName);
             $didRegister = true;
         }
     }
     return $didRegister;
 }
开发者ID:burguin,项目名称:test01,代码行数:44,代码来源:CategoryRegistry.php

示例6: loadExtTablesForExtension

 /**
  * Loads ext_tables.php for a single extension. Method is a modified copy of
  * the original bootstrap method.
  *
  * @param string $extensionKey
  * @param \ArrayAccess $extension
  * @return void
  */
 protected function loadExtTablesForExtension($extensionKey, array $extension)
 {
     // In general it is recommended to not rely on it to be globally defined in that
     // scope, but we can not prohibit this without breaking backwards compatibility
     global $T3_SERVICES, $T3_VAR, $TYPO3_CONF_VARS;
     global $TBE_MODULES, $TBE_MODULES_EXT, $TCA;
     global $PAGES_TYPES, $TBE_STYLES, $FILEICONS;
     global $_EXTKEY;
     // Load each ext_tables.php file of loaded extensions
     $_EXTKEY = $extensionKey;
     if (isset($extension['ext_tables.php']) && $extension['ext_tables.php']) {
         // $_EXTKEY and $_EXTCONF are available in ext_tables.php
         // and are explicitly set in cached file as well
         $_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY];
         require $extension['ext_tables.php'];
         Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
     }
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:26,代码来源:ExtensionCompatibilityTester.php


注:本文中的TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。