/**
  * 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);
 }
 /**
  * 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);
     }
 }
Пример #3
0
 /**
  * @test
  * @expectedException Tx_Extbase_Persistence_Exception_IllegalObjectType
  */
 public function removeChecksObjectType()
 {
     $this->repository->_set('objectType', 'ExpectedObjectType');
     $this->repository->remove(new stdClass());
 }
 /**
  * Update the object immediately in DB. This is used for time-sensitive operation such as locks.
  * @param object $modifiedObject
  */
 public function updateNow($modifiedObject)
 {
     parent::update($modifiedObject);
     $this->persistenceManager->persistAll();
 }
Пример #5
0
 public function __construct($aggregateRootClassName = NULL)
 {
     parent::__construct($aggregateRootClassName);
     // Store the current time inside the repository for an easier-to-access syntax.
     $this->executionTime =& $GLOBALS['SIM_EXEC_TIME'];
 }