/** * Add an issue * * @param Tx_Smoothmigration_Domain_Model_Issue $object * * @return void */ public function add($object) { if ($GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', 'tx_smoothmigration_domain_model_issue', 'inspection = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($object->getInspection(), 'tx_smoothmigration_domain_model_issue') . ' AND identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($object->getIdentifier(), 'tx_smoothmigration_domain_model_issue')) == 0) { parent::add($object); } }
/** * call an event before adding an event to the repo * * @see Classes/Persistence/Tx_Extbase_Persistence_Repository::add() */ public function add($object) { $object->preCreate(); parent::add($object); }
/** * @test * @expectedException Tx_Extbase_Persistence_Exception_IllegalObjectType */ public function addChecksObjectType() { $this->repository->_set('objectType', 'ExpectedObjectType'); $this->repository->add(new stdClass()); }