/** * Deletes a set of records. * * If one of the records could not be deleted, no record is deleted * * @param array array of record identifiers * @return Tinebase_Record_RecordSet */ public function delete($_ids) { $ids = array_unique((array) $_ids); $events = $this->getMultiple($ids); foreach ($events as $event) { if ($event->exdate !== null) { foreach ($event->exdate as $exception) { $exceptionId = $exception->getId(); if ($exceptionId) { $ids[] = $exceptionId; } } } } $this->_eventController->delete($ids); return $events; }
/** * Deletes a set of records. * * If one of the records could not be deleted, no record is deleted * * @param array array of record identifiers * @return Tinebase_Record_RecordSet */ public function delete($_ids) { $ids = array_unique((array) $_ids); $events = $this->getMultiple($ids); foreach ($events as $event) { if ($event->exdate !== null) { foreach ($event->exdate as $exception) { $exceptionId = $exception->getId(); if ($exceptionId) { if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) { Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Found exdate to be deleted (id: ' . $exceptionId . ')'); } array_unshift($ids, $exceptionId); } } } } $this->_eventController->delete($ids); return $events; }