Discussion:
[TYPO3-english] Extending FrontendUser (tx_extbase_type)
Sergio Catalá
2014-03-05 15:24:06 UTC
Permalink
Hi list,

I have extended the "FrontendUser" model in my own extension. My model
classname is called "FrontendUser" too, and I am using namespaces in the
class.

I would like to setup properly the "record type" for the "fe_users"
record every time a user of my model is created, as I understood I
should do that for my repository (extended from
\TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository) to find my
"fe_users" records and not all types.

In my TS setup I map my new extended class to fe_users table like this:

config.tx_extbase.persistence.classes {
Company\MyExtension\Domain\Model\FrontendUser {
mapping {
tableName = fe_users
recordType = Company\MyExtension\Domain\Model\FrontendUser
}
newRecordStoragePid = my_pid
}
}

My new records are saved in the pid I define, they are mapped in the
"fe_users" table, BUUUUT the recordType is not correct.

In my Configuration/TCA/FrontendUser.php file, I do this:

$TCA['fe_users']['columns'][$TCA['fe_users']['ctrl']['type']]['config']['items'][]
=
array('LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.Tx_MyExtension_Domain_Model_FrontendUser','Company\MyExtension\Domain\Model\FrontendUser');

But this new entry doesn't appear in the field. The label in the
locallang_db.xml is correct too.

In my Page TSConfig I setup the storage pid like this:

plugin.tx_myextension {
persistence {
storagePid = my_pid
}
}

But it can't find the records in my repository. I still have to
setRespectStoragePage to FALSE in the querySettings of my
FrontendUserRepository. I would like to get rid of this and setup things
properly.

What am I doing wrong? Am I mixing concepts?

Regards,
Sergio
Sergio Catalá
2014-03-05 15:24:52 UTC
Permalink
I am using TYPO3 6.1.7, by the way.
Post by Sergio Catalá
Hi list,
I have extended the "FrontendUser" model in my own extension. My model
classname is called "FrontendUser" too, and I am using namespaces in
the class.
I would like to setup properly the "record type" for the "fe_users"
record every time a user of my model is created, as I understood I
should do that for my repository (extended from
\TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository) to find
my "fe_users" records and not all types.
config.tx_extbase.persistence.classes {
Company\MyExtension\Domain\Model\FrontendUser {
mapping {
tableName = fe_users
recordType = Company\MyExtension\Domain\Model\FrontendUser
}
newRecordStoragePid = my_pid
}
}
My new records are saved in the pid I define, they are mapped in the
"fe_users" table, BUUUUT the recordType is not correct.
$TCA['fe_users']['columns'][$TCA['fe_users']['ctrl']['type']]['config']['items'][]
=
array('LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.Tx_MyExtension_Domain_Model_FrontendUser','Company\MyExtension\Domain\Model\FrontendUser');
But this new entry doesn't appear in the field. The label in the
locallang_db.xml is correct too.
plugin.tx_myextension {
persistence {
storagePid = my_pid
}
}
But it can't find the records in my repository. I still have to
setRespectStoragePage to FALSE in the querySettings of my
FrontendUserRepository. I would like to get rid of this and setup
things properly.
What am I doing wrong? Am I mixing concepts?
Regards,
Sergio
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Loading...