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


PHP ExtensionManager::addFieldsToAllPalettesOfField方法代码示例

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


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

示例1: canAddFieldsToAllPalettesOfFieldWithoutPaletteExistingBefore

 /**
  * Tests whether fields are added to a new palette that did not exist before.
  *
  * @test
  * @see t3lib_extMgm::addFieldsToAllPalettesOfField()
  */
 public function canAddFieldsToAllPalettesOfFieldWithoutPaletteExistingBefore()
 {
     $table = uniqid('tx_coretest_table');
     $GLOBALS['TCA'] = $this->generateTCAForTable($table);
     \TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToAllPalettesOfField($table, 'fieldA', 'newA, newA, newB, fieldX');
     $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
     $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteB']['showitem']);
     $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteC']['showitem']);
     $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteD']['showitem']);
     $this->assertEquals('newA, newB, fieldX', $GLOBALS['TCA'][$table]['palettes']['generatedFor-fieldA']['showitem']);
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:17,代码来源:ExtensionManagerTest.php

示例2: die

<?php

// Make sure that we are executed only from the inside of TYPO3
if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
// Prepare new columns for be_users table
$tempColumns = array('tx_openid_openid' => array('exclude' => 0, 'label' => 'LLL:EXT:openid/locallang_db.xml:be_users.tx_openid_openid', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim,nospace,unique')));
// Add new columns to be_users table
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('be_users');
\TYPO3\CMS\Core\Extension\ExtensionManager::addTCAcolumns('be_users', $tempColumns, FALSE);
\TYPO3\CMS\Core\Extension\ExtensionManager::addToAllTCAtypes('be_users', 'tx_openid_openid;;;;1-1-1', '', 'after:username');
\TYPO3\CMS\Core\Extension\ExtensionManager::addLLrefForTCAdescr('be_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
// Prepare new columns for fe_users table
$tempColumns['tx_openid_openid']['config']['eval'] = 'trim,nospace,uniqueInPid';
// Add new columns to fe_users table
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('fe_users');
\TYPO3\CMS\Core\Extension\ExtensionManager::addTCAcolumns('fe_users', $tempColumns, FALSE);
\TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToAllPalettesOfField('fe_users', 'username', 'tx_openid_openid');
\TYPO3\CMS\Core\Extension\ExtensionManager::addLLrefForTCAdescr('fe_users', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
// Add field to setup module
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['tx_openid_openid'] = array('type' => 'user', 'table' => 'be_users', 'label' => 'LLL:EXT:openid/locallang_db.xml:_MOD_user_setup.tx_openid_openid', 'csh' => 'tx_openid_openid', 'userFunc' => 'EXT:openid/class.tx_openid_mod_setup.php:TYPO3\\CMS\\Openid\\OpenidModuleSetup->renderOpenID', 'access' => 'TYPO3\\CMS\\Openid\\OpenidModuleSetup');
\TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToUserSettings('tx_openid_openid', 'after:password2');
\TYPO3\CMS\Core\Extension\ExtensionManager::addLLrefForTCAdescr('_MOD_user_setup', 'EXT:openid/locallang_csh_mod.xml');
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:24,代码来源:ext_tables.php


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