[FLOW3-general] Question Package TYPO3.Blog AccountController

Bernhard Marx bernhard.marx at marxdesign.de
Wed Nov 2 22:23:55 CET 2011


Hello,

 

/**

       * @return void

       */

       public function initializeUpdateAction() {

 
$this->arguments['account']->getPropertyMappingConfiguration()->setTargetTyp
eForSubProperty('party', 'TYPO3\Party\Domain\Model\Person');

 
$this->arguments['account']->getPropertyMappingConfiguration()->allowModific
ationForSubProperty('party');

 
$this->arguments['account']->getPropertyMappingConfiguration()->allowModific
ationForSubProperty('party.name');

       }

 

       /**

       * Updates the account properties

       *

       * @param TYPO3\FLOW3\Security\Account $account

       * @param string $password

       * @return void

       */

       public function updateAction(\TYPO3\FLOW3\Security\Account $account,
$password = '') {

              if ($password != '') {

 
$account->setCredentialsSource($this->hashService->hashPassword($password));

              }

 

              $this->accountRepository->update($account);

              $this->partyRepository->update($account->getParty());

              $this->addFlashMessage('Your account details have been
updated.');

              $this->redirect('index', 'Admin');

       }

 

Why we have the relation to TYPO.Party? What is the sense here of
partyRepository and initializeUpdateAction?

 

Thanks

 

Bernhard

 

 



More information about the FLOW3-general mailing list