Project

General

Profile

Bug #86804 ยป fe_users.php

Ivano Luberti, 2018-10-30 17:56

 
<?php

defined('TYPO3_MODE') or die();

$ll = 'LLL:EXT:aip_mediakey/Resources/Private/Language/locallang_db.xlf:';

$temporaryColumns = [
'vat_code' => [
'exclude' => false,
'label' => $ll.'tx_aipmediakey_domain_model_fe_users.vat_code',
'config' => [
'type' => 'input',
'size' => '30',
'eval' => 'trim'
]
],
'tipo' => [
'exclude' => false,
'label' => $ll.'tx_aipmediakey_domain_model_fe_users.tipo',
'config' => [
'type' => 'radio',
'items' => [
[ $ll . 'tx_aipmediakey_domain_model_fe_users.tipo.agenzia', 0 ],
[ $ll . 'tx_aipmediakey_domain_model_fe_users.tipo.giurato', 1 ],
],
]
],

'tx_awards_categories' =>[
'exclude' => false,
'label' => $ll.'tx_aipmediakey_domain_model_fe_users.categorie',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tx_aipmediakey_domain_model_categories',
'MM' => 'tx_aipmediakey_feusers_categories_mm',
'foreign_table' => 'tx_aipmediakey_domain_model_categories',
'size' => 10,
'minitems' => 0,
'maxitems' => 100,
// 'suggestOptions' => array(
// 'type' => 'suggest',
// 'default' => array(
// 'searchCondition' => 'pid=###CURRENT_PID###',
// ),
// ),
'suggestOptions' => [
'default' => [
'suggestOptions' => true,
'addWhere' => ' AND pid=###CURRENT_PID###'
]
],


],
],

];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'fe_users',
$temporaryColumns,
TRUE
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'fe_users',
'vat_code;;;;1-1-1, tipo;;;;1-1-1, tx_awards_categories'
);
    (1-1/1)