[TYPO3-mvc] property persistence on showAction
Henry DoShell
digital at dollerschell.de
Sat Dec 14 18:26:21 CET 2013
Hi,
I need to persistence an calculated property when a detail page is viewed. The property has getter, setter and repository, is calculated in model and shows up right on the page. It has to be written to the database.
I tried the following:
/**
* action show
*
* @param \DoShell\TouristBbhotel\Domain\Model\Main $main
* @return void
*/
public function showAction(\DoShell\TouristBbhotel\Domain\Model\Main $main) {
$this->view->assign('main', $main);
$persistenceManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager');
$persistenceManager->persistAll();
}
But it does not work. What I am missing? Can someone push me in the right direction?
Thanks
Henry
More information about the TYPO3-project-typo3v4mvc
mailing list