/** * @test */ public function setNameForStringSetsName() { $this->subject->setName('Conceived at T3CON10'); $this->assertAttributeEquals('Conceived at T3CON10', 'name', $this->subject); }
/** * action update * @param \MUM\BjrFreizeit\Domain\Model\Holiday $holiday * @return void * */ public function updateAction(\MUM\BjrFreizeit\Domain\Model\Holiday $holiday) { $redirectParams = array(); $args = $this->request->getArguments(); if ($holiday->_isNew() || $holiday->_isDirty()) { if ($holiday->_isNew()) { $holiday->setPid($this->settings['pidOrganizationFolder']); $this->holidayRepository->add($holiday); //it is not persistent already, we have to do it! $persistenceManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager'); $persistenceManager->persistAll(); //now organization ist persistent $GLOBALS['TSFE']->fe_user->setKey("ses", "holidayChange", 'Die Ferienzeit <strong>' . $holiday->getName() . '</strong> wurde neu angelegt.'); } else { $this->holidayRepository->update($holiday); $GLOBALS['TSFE']->fe_user->setKey("ses", "holidayChange", 'Die Ferienzeit <strong>' . $holiday->getName() . '</strong> wurde geƤndert.'); } } $redirectParams['holiday'] = $holiday; $this->redirect('successUpdate', 'Holiday', NULL, $redirectParams); }