function removeThis() { $exportItems = $this->fetchItems(); $db = eZDB::instance(); $db->begin(); foreach ($exportItems as $item) { $item->remove(); } eZPersistentObject::remove(); $db->commit(); }
function remove($conditions = null, $extraConditions = null) { if ($this->attribute('version') == eZPDFExport::VERSION_VALID && $this->attribute('status') != eZPDFExport::CREATE_ONFLY) { $sys = eZSys::instance(); $storage_dir = $sys->storageDirectory(); $filename = $storage_dir . '/pdf/' . $this->attribute('pdf_filename'); if (file_exists($filename)) { unlink($filename); } } parent::remove($conditions, $extraConditions); }
function removeThis($remove_childs = false) { $db = eZDB::instance(); $db->begin(); if (is_array($remove_childs)) { foreach ($remove_childs as $event) { $event->remove(); } } else { if ($remove_childs) { eZPersistentObject::removeObject(eZWorkflowEvent::definition(), array("workflow_id" => $this->ID, "version" => $this->Version)); } } eZPersistentObject::remove(); $db->commit(); }
function remove($removeAttributes = false, $version = eZContentClass::VERSION_STATUS_DEFINED) { // If we are not allowed to remove just return false if ($this->Version == eZContentClass::VERSION_STATUS_DEFINED && !$this->isRemovable()) { return false; } if (is_array($removeAttributes) or $removeAttributes) { $this->removeAttributes($removeAttributes); } $this->NameList->remove($this); eZPersistentObject::remove(); }
/** * remove the current subscription * @see kernel/classes/eZPersistentObject#remove($conditions, $extraConditions) */ function remove($conditions = null, $extraConditions = null) { CjwNewsletterLog::writeNotice('CjwNewsletterSubscription::remove', 'subscription', 'remove', array('nl_user' => $this->attribute('newsletter_user_id'), 'subscription_id' => $this->attribute('id'), 'modifier' => eZUser::currentUserID())); foreach ($currentNewsletterSubscriptionObjects as $subscription) { $subscription->remove(); } parent::remove($conditions, $extraConditions); }
/** * When a blacklist item is removed, remove the blacklist entries for the user */ public function remove($conditions = null, $extraConditions = null) { $newsletterUserObject = $this->getNewsletterUserObject(); if (is_object($newsletterUserObject)) { $newsletterUserObject->setNonBlacklisted(); } return parent::remove($conditions = null, $extraConditions = null); }
function removeThis( $quiet = false ) { $dataType = $this->dataType(); if ( $dataType->isClassAttributeRemovable( $this ) ) { self::expireCache( $this->ID, $this->attribute( 'contentclass_id' ) ); $db = eZDB::instance(); $db->begin(); $dataType->deleteStoredClassAttribute( $this, $this->Version ); eZPersistentObject::remove(); $db->commit(); return true; } else { if ( !$quiet ) { eZDebug::writeError( 'Datatype [' . $dataType->attribute( 'name' ) . '] can not be deleted to avoid system crash' ); } return false; } }
function removeThis( $conditions = null, $extraConditions = null ) { eZPersistentObject::remove( array( "id" => $this->ID ), $extraConditions ); }
function remove($conditions = null, $extraConditions = null) { foreach ($this->fetchQuestionResultList(true) as $questionResult) { $questionResult->remove(); } eZPersistentObject::remove(); }
function remove($conditions = null, $extraConditions = null) { foreach ($this->fetchRecipientsLists() as $list) { $list->remove(); } foreach ($this->fetchSubscribers() as $subscriber) { $subscriber->remove(); } eZPersistentObject::remove(); }
/** * Removes the language if there is no object having translation in it. * * \return True if the language was removed from the site, false otherwise. */ function removeThis() { if ($this->objectCount() > 0 or $this->classCount() > 0) { return false; } eZPersistentObject::remove(); eZContentCacheManager::clearAllContentCache(); eZContentLanguage::fetchList(true); return true; }
function removeThis() { $itemOptionList = eZProductCollectionItemOption::fetchList($this->attribute('id')); $db = eZDB::instance(); $db->begin(); foreach ($itemOptionList as $itemOption) { $itemOption->remove(); } eZPersistentObject::remove(); $db->commit(); }
/** * remove the current newlsetter user and all depending nl subscriptions * @see kernel/classes/eZPersistentObject#remove($conditions, $extraConditions) */ function remove($conditions = null, $extraConditions = null) { // remove subscriptions $currentNewsletterSubscriptionObjects = $this->attribute('subscription_array'); CjwNewsletterLog::writeNotice('CjwNewsletterUser::remove', 'user', 'remove', array('nl_user' => $this->attribute('id'), 'subscription_count' => count($currentNewsletterSubscriptionObjects), 'subscriptions_to_remove' => implode('|', array_keys($currentNewsletterSubscriptionObjects)), 'modifier' => eZUser::currentUserID())); foreach ($currentNewsletterSubscriptionObjects as $subscription) { $subscription->remove(); } $blackListItem = CjwNewsletterBlacklistItem::fetchByEmail($this->attribute('email')); if (is_object($blackListItem)) { $blackListItem->setAttribute('newsletter_user_id', 0); $blackListItem->store(); } parent::remove($conditions, $extraConditions); }
function remove($conditions = null, $extraConditions = null) { $GLOBALS['eZSurveyQuestionTypes'][$this->Type]['count']--; parent::remove(); }
/** * Removes self, while also removing related translations and links to objects * * @param mixed $conditions * @param mixed $extraConditions */ public function remove($conditions = null, $extraConditions = null) { foreach ($this->getTagAttributeLinks() as $tagAttributeLink) { $tagAttributeLink->remove(); } foreach ($this->getTranslations() as $translation) { $translation->remove(); } parent::remove($conditions, $extraConditions); }