Guest User

TCA for Class B

a guest
May 16th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.20 KB | None | 0 0
  1. <?php
  2. if (!defined ('TYPO3_MODE')) {
  3.     die ('Access denied.');
  4. }
  5.  
  6. $tmp_myext_columns = array(
  7.  
  8.     'lockable' => array(
  9.         'exclude' => 0,
  10.         'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_utility.lockable',
  11.         'config' => array(
  12.             'type' => 'check',
  13.             'default' => 0
  14.         ),
  15.     ),
  16.     'quantity' => array(
  17.         'exclude' => 0,
  18.         'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_utility.quantity',
  19.         'config' => array(
  20.             'type' => 'input',
  21.             'size' => 4,
  22.             'eval' => 'int',
  23.                         'default' => 0
  24.         ),
  25.     ),
  26.         'originalUtility' => array(
  27.             'exclude' => 0,
  28.             'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_utility.originalUtility',
  29.             'config' => array(
  30.                 'type' => 'inline',
  31.                 'foreign_table' => 'tx_myext_domain_model_space',
  32.                                 'minitems'      => 0,
  33.                 'maxitems'      => 1,
  34.                 'appearance' => array(
  35.                     'collapseAll' => 0,
  36.                     'levelLinksPosition' => 'top',
  37.                     'showSynchronizationLink' => 1,
  38.                     'showPossibleLocalizationRecords' => 1,
  39.                     'showAllLocalizationLink' => 1
  40.                 ),
  41.             ),
  42.         ),
  43. );
  44.  
  45. $tmp_myext_columns['form'] = array(
  46.     'config' => array(
  47.         'type' => 'passthrough',
  48.     )
  49. );
  50.  
  51. t3lib_extMgm::addTCAcolumns('tx_myext_domain_model_space',$tmp_myext_columns);
  52.  
  53. $TCA['tx_myext_domain_model_space']['columns'][$TCA['tx_myext_domain_model_space']['ctrl']['type']]['config']['items'][] = array('LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_space.tx_extbase_type.tx_myext_Utility','tx_myext_Utility');
  54.  
  55. $TCA['tx_myext_domain_model_space']['types']['tx_myext_Utility']['showitem'] = $TCA['tx_myext_domain_model_space']['types']['1']['showitem'];
  56. $TCA['tx_myext_domain_model_space']['types']['tx_myext_Utility']['showitem'] .= ',--div--;LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_utility,';
  57. $TCA['tx_myext_domain_model_space']['types']['tx_myext_Utility']['showitem'] .= 'lockable, quantity, originalUtility';
  58.  
  59. ## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
  60. ?>
Advertisement
Add Comment
Please, Sign In to add comment