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


PHP ExtensionManagementUtility::addFieldsToAllPalettesOfField方法代码示例

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


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

示例1: addFieldsToAllPalettesOfFieldAddsNewPaletteIfFieldHasNoPaletteYetAndKeepsExistingLabel

 /**
  * @test
  */
 public function addFieldsToAllPalettesOfFieldAddsNewPaletteIfFieldHasNoPaletteYetAndKeepsExistingLabel()
 {
     $GLOBALS['TCA'] = array('aTable' => array('columns' => array('fieldA' => array()), 'types' => array('typeA' => array('showitem' => 'fieldA;labelA'))));
     $expected = array('aTable' => array('columns' => array('fieldA' => array()), 'types' => array('typeA' => array('showitem' => 'fieldA;labelA, --palette--;;generatedFor-fieldA')), 'palettes' => array('generatedFor-fieldA' => array('showitem' => 'newA'))));
     ExtensionManagementUtility::addFieldsToAllPalettesOfField('aTable', 'fieldA', 'newA');
     $this->assertEquals($expected, $GLOBALS['TCA']);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:10,代码来源:ExtensionManagementUtilityTest.php

示例2: defined

<?php

defined('TYPO3_MODE') or die;
// Prepare new columns for fe_users table
$tempColumns = array('tx_openid_openid' => array('exclude' => 0, 'label' => 'LLL:EXT:openid/locallang_db.xlf:be_users.tx_openid_openid', 'config' => array('type' => 'input', 'size' => '30', 'eval' => 'trim,nospace,uniqueInPid', 'wizards' => array('0' => array('type' => 'popup', 'title' => 'Add OpenID', 'module' => array('name' => 'wizard_openid'), 'icon' => 'EXT:openid/ext_icon_small.png', 'JSopenParams' => ',width=800,height=600,status=0,menubar=0,scrollbars=0')))));
// Add new columns to fe_users table
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToAllPalettesOfField('fe_users', 'username', 'tx_openid_openid');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('fe_users', 'EXT:openid' . '/locallang_csh.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_user_setup', 'EXT:openid/locallang_csh_mod.xlf');
开发者ID:Gregpl,项目名称:TYPO3.CMS,代码行数:10,代码来源:fe_users.php

示例3: canAddFieldsToAllPalettesOfFieldWithoutPaletteExistingBefore

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

示例4: canAddFieldsToAllPalettesOfFieldWithoutPaletteExistingBefore

	/**
	 * Tests whether fields are added to a new palette that did not exist before.
	 *
	 * @test
	 * @see ExtensionManagementUtility::addFieldsToAllPalettesOfField()
	 */
	public function canAddFieldsToAllPalettesOfFieldWithoutPaletteExistingBefore() {
		$table = $this->getUniqueId('tx_coretest_table');
		$GLOBALS['TCA'] = $this->generateTCAForTable($table);
		ExtensionManagementUtility::addFieldsToAllPalettesOfField($table, 'fieldA', 'newA, newA, newB, fieldX');
		// is palette reference added
		$this->assertSame('fieldA;;generatedFor-fieldA, fieldB, fieldC;labelC;paletteC;specialC, fieldC1, fieldD, fieldD1', $GLOBALS['TCA'][$table]['types']['typeA']['showitem']);
		$this->assertEquals('fieldX, fieldX1, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
		$this->assertEquals('fieldX, fieldX1, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteB']['showitem']);
		$this->assertEquals('fieldX, fieldX1, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteC']['showitem']);
		$this->assertEquals('fieldX, fieldX1, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteD']['showitem']);
		$this->assertEquals('newA, newB, fieldX', $GLOBALS['TCA'][$table]['palettes']['generatedFor-fieldA']['showitem']);
	}
开发者ID:,项目名称:,代码行数:18,代码来源:


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