[TYPO3-mvc] Relation to fe_user / Tx_Extbase_Domain_Model_FrontendUser

Stephan Petzl spetzl at gmx.at
Fri Jan 14 16:28:56 CET 2011


Hi there!

I could not find any hints on how to implement a simple relation to 
Tx_Extbase_Domain_Model_FrontendUser.

I tried the most obvious aproach, my game-model looks like that:

class Tx_MyExt_Domain_Model_Game extends 
Tx_Extbase_DomainObject_AbstractEntity {
...
/**
	 * user
	 *
	 * @var Tx_Extbase_Domain_Model_FrontendUser $user
	 */
	protected $user;
/**
	 * Setter for user
	 *
	 * @param Tx_Extbase_Domain_Model_FrontendUser $user user
	 * @return void
	 */
	public function setUser(Tx_Extbase_Domain_Model_FrontendUser $user) {
		$this->user = $user;
	}

	/**
	 * Getter for user
	 *
	 * @return Tx_Extbase_Domain_Model_FrontendUser user
	 */
	public function getUser() {
		return $this->user;
	}
...

In my template I tried to <f:debug>{game}</f:debug> with following 
result: the user property is empty:

Tx_AjadoDpm_Domain_Model_Game Object
(
     [height:protected] => 300
     [user:protected] =>
     [time:protected] => 2000
     ...
)

Any ideas what I'm missing?


-- 
Best Regards
Stephan Petzl
http://www.ajado.com


More information about the TYPO3-project-typo3v4mvc mailing list