本文整理汇总了PHP中eZPersistentObject::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP eZPersistentObject::remove方法的具体用法?PHP eZPersistentObject::remove怎么用?PHP eZPersistentObject::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZPersistentObject
的用法示例。
在下文中一共展示了eZPersistentObject::remove方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeThis
function removeThis()
{
$exportItems = $this->fetchItems();
$db = eZDB::instance();
$db->begin();
foreach ($exportItems as $item) {
$item->remove();
}
eZPersistentObject::remove();
$db->commit();
}
示例2: remove
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);
}
示例3: remove
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();
}
示例4: 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);
}
示例5: remove
/**
* 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);
}
示例6: removeThis
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;
}
}
示例7: removeThis
function removeThis( $conditions = null, $extraConditions = null )
{
eZPersistentObject::remove( array( "id" => $this->ID ), $extraConditions );
}
示例8: remove
function remove($conditions = null, $extraConditions = null)
{
foreach ($this->fetchQuestionResultList(true) as $questionResult) {
$questionResult->remove();
}
eZPersistentObject::remove();
}
示例9: remove
function remove($conditions = null, $extraConditions = null)
{
foreach ($this->fetchRecipientsLists() as $list) {
$list->remove();
}
foreach ($this->fetchSubscribers() as $subscriber) {
$subscriber->remove();
}
eZPersistentObject::remove();
}
示例10: removeThis
function removeThis()
{
$itemOptionList = eZProductCollectionItemOption::fetchList($this->attribute('id'));
$db = eZDB::instance();
$db->begin();
foreach ($itemOptionList as $itemOption) {
$itemOption->remove();
}
eZPersistentObject::remove();
$db->commit();
}
示例11: remove
/**
* 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);
}
示例12: remove
function remove($conditions = null, $extraConditions = null)
{
$GLOBALS['eZSurveyQuestionTypes'][$this->Type]['count']--;
parent::remove();
}
示例13: 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);
}