Advertisement
Guest User

Untitled

a guest
Jun 6th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | None | 0 0
  1. $newColumns = array(
  2.     'ratings' => array(
  3.         'label'   => $lll . 'somelabel',
  4.         'config'  => array(
  5.             'readOnly'          => '1',
  6.             'type'              => 'select',
  7.             'foreign_table'     => 'mytable',
  8.             'foreign_field'     => 'somefield',
  9.             'maxitems'          => '1000000',
  10.             'minitems'          => '0',
  11.             'autoSizeMax'       => '20',
  12.         ),
  13.     ),
  14. );
  15.  
  16. ExtensionManagementUtility::addTCAcolumns('fe_users', $newColumns);
  17.  
  18. // Add  types to the TCA
  19. $recordType = 'MyRecordType';
  20. $GLOBALS['TCA']['fe_users']['types'][$recordType] = $GLOBALS['TCA']['fe_users']['types']['0'];
  21. $GLOBALS['TCA']['fe_users']['columns']['tx_extbase_type']['config']['items'][] = array(
  22.     $lll . 'anotherlabel',
  23.     $recordType
  24. );
  25. ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'ratings', $recordType, 'after:tx_extbase_type');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement