[TYPO3-mvc] Extending fe_users

Xavier Perseguers typo3 at perseguers.ch
Wed May 12 12:16:16 CEST 2010


Hi,

Resurrecting this old thread as I'm trying to do this task without 
finding a real step-by-step tutorial ;-)

What I have:

Extension "myextA" that already properly extends fe_users 
(ext_tables.php, TCA) but without relying on Extbase.

This means I have additional columns of kind "tx_myexta_special_info" in 
fe_users.

I want to create an extension "myextB" which uses Extbase to work on 
those fields.

I have the standard repository:

class Tx_Myextb_Domain_Repository_UserRepository extends 
Tx_Extbase_Domain_Repository_FrontendUserRepository {

}

and the extended user class:

class Tx_Myextb_Domain_Model_User extends 
Tx_Extbase_Domain_Model_FrontendUser {

	/**
	 * @var string
	 */
	protected $specialInfo;

	public function setSpecialInfo($specialInfo) {
		$this->specialInfo = $specialInfo;
	}
	public function getSpecialInfo() {
		return $this->specialInfo;
	}
}

Now, as read in this thread, I added a ext_typoscript_setup.txt file at 
root containing:

config.tx_extbase {
     persistence{
         classes {
             Tx_Extbase_Domain_Model_FrontendUser {
                 mapping {
                     columns {
                         tx_myexta_special_info.mapOnProperty = specialInfo;
                     }
                 }
             }
         }
     }
}

But this property does not get populated when retrieving users through 
extB's UserRepository.

What is missing?

Thanks.

Xavier Perseguers


More information about the TYPO3-project-typo3v4mvc mailing list