Skip to content
Snippets Groups Projects
fe_users.php 1.34 KiB
Newer Older
<?php

$GLOBALS['TCA']['fe_users']['columns']['usergroup']['exclude'] = TRUE;

$tabLabel = 'LLL:EXT:sg_rest/Resources/Private/Language/locallang_db.xlf:fe_users.tab.rest_authentification';
$position = '--div--;' . $tabLabel . ', tx_sgrest_auth_token, tx_sgrest_access_groups, tx_sgrest_test_mode';

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', $position);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
	'fe_users', [
		'tx_sgrest_auth_token' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_rest/Resources/Private/Language/locallang_db.xlf:fe_users.tx_sgrest_auth_token',
			'config' => [
				'type' => 'input',
				'size' => 40
			],
		],
		'tx_sgrest_access_groups' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_rest/Resources/Private/Language/locallang_db.xlf:fe_users.tx_sgrest_access_groups',
			'config' => [
				'type' => 'select',
				'renderType' => 'selectMultipleSideBySide',
				'size' => 10,
				'minitems' => 0,
				'maxitems' => 99,
				'itemsProcFunc' => 'EXT:sg_rest/Classes/TCA/TcaProvider.php:SGalinski\SgRest\TCA\TcaProvider->createAccessGroupItemList',
			],
		],
		'tx_sgrest_test_mode' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_rest/Resources/Private/Language/locallang_db.xlf:fe_users.tx_sgrest_test_mode',
			'config' => [
				'type' => 'check',
			],
		],
	]
);

?>