Skip to content

Instantly share code, notes, and snippets.

@radmiraal
Created March 11, 2013 12:07
Show Gist options
  • Save radmiraal/5133807 to your computer and use it in GitHub Desktop.
Save radmiraal/5133807 to your computer and use it in GitHub Desktop.
$tmp_test_columns = array(
'test' => array(
'exclude' => 0,
'label' => 'LLL:EXT:test/Resources/Private/Language/locallang_db.xlf:tx_test_domain_model_person.test',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
);
t3lib_extMgm::addTCAcolumns('fe_users',$tmp_test_columns);
$TCA['fe_users']['columns'][$TCA['fe_users']['ctrl']['type']]['config']['items'][] = array('LLL:EXT:test/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.Tx_Test_Person','Tx_Test_Person');
$TCA['fe_users']['types']['Tx_Test_Person']['showitem'] = $TCA['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser']['showitem'];
$TCA['fe_users']['types']['Tx_Test_Person']['showitem'] .= ',--div--;LLL:EXT:test/Resources/Private/Language/locallang_db.xlf:tx_test_domain_model_person,';
$TCA['fe_users']['types']['Tx_Test_Person']['showitem'] .= 'test';
#
# Table structure for table 'fe_users'
#
CREATE TABLE fe_users (
tx_extbase_type varchar(255) DEFAULT '' NOT NULL,
);
#
# Table structure for table 'tx_test_company_person_mm'
#
CREATE TABLE tx_test_company_person_mm (
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
config.tx_extbase{
persistence{
classes{
TYPO3\CMS\Extbase\Domain\Model\FrontendUser {
subclasses {
Tx_Test_Person = Radmiraal\Test\Domain\Model\Person
}
}
Radmiraal\Test\Domain\Model\Person {
mapping {
tableName = fe_users
recordType = Tx_Test_Person
}
}
}
}
}
Domain model config:
Domain object settings > Extend existing model class: \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment