當前位置: 首頁>>代碼示例>>PHP>>正文


PHP eZPersistentObject::removeObject方法代碼示例

本文整理匯總了PHP中eZPersistentObject::removeObject方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZPersistentObject::removeObject方法的具體用法?PHP eZPersistentObject::removeObject怎麽用?PHP eZPersistentObject::removeObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在eZPersistentObject的用法示例。


在下文中一共展示了eZPersistentObject::removeObject方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: removeByAttribute

 /**
  * Removes the data from the table by attribute
  *
  * @param int $contentObjectAttributeId
  * @param int $contentObjectAttributeVersion
  */
 static function removeByAttribute($contentObjectAttributeId, $contentObjectAttributeVersion = null)
 {
     $conditions = array('contentobject_attribute_id' => $contentObjectAttributeId);
     if ($contentObjectAttributeVersion !== null) {
         $conditions['contentobject_attribute_version'] = $contentObjectAttributeVersion;
     }
     eZPersistentObject::removeObject(self::definition(), $conditions);
 }
開發者ID:netgen,項目名稱:enhancedselection2,代碼行數:14,代碼來源:sckenhancedselection.php

示例2: removeByID

 static function removeByID($id, $version)
 {
     if ($version == null) {
         eZPersistentObject::removeObject(eZBinaryFile::definition(), array('contentobject_attribute_id' => $id));
     } else {
         eZPersistentObject::removeObject(eZBinaryFile::definition(), array('contentobject_attribute_id' => $id, 'version' => $version));
     }
 }
開發者ID:patrickallaert,項目名稱:ezpublish-legacy-php7,代碼行數:8,代碼來源:ezbinaryfile.php

示例3: removeByObjectId

 /**
  * Remove calculated ratings by content object id and optionally attribute id.
  * 
  * @param int $contentobjectID
  * @param int $contentobjectAttributeId
  */
 static function removeByObjectId($contentobjectID, $contentobjectAttributeId = null)
 {
     $cond = array('contentobject_id' => $contentobjectID);
     if ($contentobjectAttributeId !== null) {
         $cond['contentobject_attribute_id'] = $contentobjectAttributeId;
     }
     eZPersistentObject::removeObject(self::definition(), $cond);
 }
開發者ID:nlescure,項目名稱:ezstarrating,代碼行數:14,代碼來源:ezsrratingobject.php

示例4: removeByAttribute

 /**
  * Removes the objects from persistence which are related to content object attribute
  * defined by attribute ID and attribute version
  *
  * @static
  *
  * @param int $objectAttributeID
  * @param int|null $objectAttributeVersion
  */
 public static function removeByAttribute($objectAttributeID, $objectAttributeVersion = null)
 {
     if (!is_numeric($objectAttributeID)) {
         return;
     }
     $conditions = array('objectattribute_id' => (int) $objectAttributeID);
     if (is_numeric($objectAttributeVersion)) {
         $conditions['objectattribute_version'] = (int) $objectAttributeVersion;
     }
     parent::removeObject(self::definition(), $conditions);
 }
開發者ID:oki34,項目名稱:eztags,代碼行數:20,代碼來源:eztagsattributelinkobject.php

示例5: removeByOAID

 static function removeByOAID($objectAttributeID, $objectAttributeVersion = null)
 {
     $db = eZDB::instance();
     $db->begin();
     if ($objectAttributeVersion == null) {
         eZPersistentObject::removeObject(eZMultiPriceData::definition(), array('contentobject_attr_id' => $objectAttributeID));
     } else {
         eZPersistentObject::removeObject(eZMultiPriceData::definition(), array('contentobject_attr_id' => $objectAttributeID, 'contentobject_attr_version' => $objectAttributeVersion));
     }
     $db->commit();
 }
開發者ID:patrickallaert,項目名稱:ezpublish-legacy-php7,代碼行數:11,代碼來源:ezmultipricedata.php

示例6: removeByValue

 static function removeByValue($value, $policyID = false)
 {
     if ($policyID) {
         $limitationIDList = array();
         $limitations = eZPolicyLimitation::fetchByPolicyID($policyID, false);
         foreach ($limitations as $limitationArray) {
             $limitationIDList[] = $limitationArray['id'];
         }
         if (count($limitationIDList) > 0) {
             eZPersistentObject::removeObject(eZPolicyLimitationValue::definition(), array('limitation_id' => array($limitationIDList), "value" => $value));
             return;
         }
     }
     eZPersistentObject::removeObject(eZPolicyLimitationValue::definition(), array("value" => $value));
 }
開發者ID:mugoweb,項目名稱:ezpublish-legacy,代碼行數:15,代碼來源:ezpolicylimitationvalue.php

示例7: removeEmpty

 static function removeEmpty()
 {
     $db = eZDB::instance();
     if ($db->databaseName() == 'oracle') {
         // fix for compatibility with Oracle versions prior to 9
         $query = 'SELECT eznotificationcollection.id FROM eznotificationcollection, eznotificationcollection_item
                   WHERE  eznotificationcollection.id = eznotificationcollection_item.collection_id(+) AND
                          eznotificationcollection_item.collection_id IS NULL';
     } else {
         $query = 'SELECT eznotificationcollection.id FROM eznotificationcollection
                   LEFT JOIN eznotificationcollection_item ON eznotificationcollection.id=eznotificationcollection_item.collection_id
                   WHERE eznotificationcollection_item.collection_id IS NULL';
     }
     $idArray = $db->arrayQuery($query);
     $db->begin();
     foreach ($idArray as $id) {
         eZPersistentObject::removeObject(eZNotificationCollection::definition(), array('id' => $id['id']));
     }
     $db->commit();
 }
開發者ID:EVE-Corp-Center,項目名稱:ECC-Website,代碼行數:20,代碼來源:eznotificationcollection.php

示例8: removeByID

 /**
  * Remove the given category and all references to it.
  *
  * \public
  * \static
  */
 static function removeByID($id)
 {
     $id = (int) $id;
     $db = eZDB::instance();
     $db->begin();
     // Delete references to the category from VAT charging rules.
     eZVatRule::removeReferencesToProductCategory($id);
     // Reset product category attribute for all products
     // that have been referencing the category.
     $ini = eZINI::instance('shop.ini');
     if ($ini->hasVariable('VATSettings', 'ProductCategoryAttribute') && ($categoryAttrName = $ini->variable('VATSettings', 'ProductCategoryAttribute'))) {
         $categoryAttrName = $db->escapeString($categoryAttrName);
         $query = "SELECT coa.id FROM ezcontentobject_attribute coa, ezcontentclass_attribute cca, ezcontentobject co " . "WHERE " . " cca.id=coa.contentclassattribute_id " . " AND coa.contentobject_id=co.id " . " AND cca.data_type_string='ezproductcategory' " . " AND cca.identifier='{$categoryAttrName}' " . " AND coa.version=co.current_version " . " AND coa.data_int={$id}";
         $rows = $db->arrayQuery($query);
         foreach ($rows as $row) {
             $query = "UPDATE ezcontentobject_attribute SET data_int=0, sort_key_int=0 WHERE id=" . (int) $row['id'];
             $db->query($query);
         }
     }
     // Remove the category itself.
     eZPersistentObject::removeObject(eZProductCategory::definition(), array("id" => $id));
     $db->commit();
 }
開發者ID:patrickallaert,項目名稱:ezpublish-legacy-php7,代碼行數:29,代碼來源:ezproductcategory.php

示例9: removeByUserID

 static function removeByUserID($userID)
 {
     eZPersistentObject::removeObject(eZUserSetting::definition(), array('user_id' => $userID));
 }
開發者ID:CG77,項目名稱:ezpublish-legacy,代碼行數:4,代碼來源:ezusersetting.php

示例10: array

$module = $Params['Module'];
$http = eZHTTPTool::instance();
$tpl = eZTemplate::factory();
if ($http->hasPostVariable('SaveRule_itnewsletter')) {
    // AGGIUNGO LA REGISTRAZIONE DELL'UTENTE AL TAG DELLA NEWSLETTER //
    $tagID = $http->postVariable('SaveRule_itnewsletter');
    $user = eZUser::currentUser();
    $existingTags = ITNewsletterNotificationRule::fetchTagsForUserID($user->attribute('contentobject_id'), false);
    if (!in_array($tagID, $existingTags)) {
        $rule = ITNewsletterNotificationRule::create($tagID, $user->attribute('contentobject_id'));
        $rule->store();
    }
} else {
    if ($http->hasPostVariable('RemoveRule_itnewsletter')) {
        // TOLGO LA REGISTRAZIONE DELL'UTENTE AL TAG DELLA NEWSLETTER //
        $user = eZUser::currentUser();
        $listID = array();
        $userList = ITNewsletterNotificationRule::fetchList($user->attribute('contentobject_id'), false);
        foreach ($userList as $userRow) {
            $listID[] = $userRow['id'];
        }
        $ruleIDList = $http->postVariable('RemoveRule_itnewsletter');
        foreach ($ruleIDList as $ruleID) {
            if (in_array($ruleID, $listID)) {
                eZPersistentObject::removeObject(ITNewsletterNotificationRule::definition(), array('id' => $ruleID));
            }
        }
    }
}
$Result['content'] = $tpl->fetch('design:ptn/newsletter.tpl');
$Result['path'] = array(array('url' => false, 'text' => 'Newsletter'));
開發者ID:informaticatrentina,項目名稱:pat_base,代碼行數:31,代碼來源:newsletter.php

示例11: removeForNode

 static function removeForNode($nodeID)
 {
     eZPersistentObject::removeObject(eZTipafriendCounter::definition(), array('node_id' => $nodeID));
 }
開發者ID:legende91,項目名稱:ez,代碼行數:4,代碼來源:eztipafriendcounter.php

示例12: removeUser

 static function removeUser($userID)
 {
     $user = eZUser::fetch($userID);
     if (!$user) {
         eZDebug::writeError("unable to find user with ID {$userID}", __METHOD__);
         return false;
     }
     eZUser::removeSessionData($userID);
     eZSubtreeNotificationRule::removeByUserID($userID);
     eZCollaborationNotificationRule::removeByUserID($userID);
     eZUserSetting::removeByUserID($userID);
     eZUserAccountKey::removeByUserID($userID);
     eZForgotPassword::removeByUserID($userID);
     eZWishList::removeByUserID($userID);
     eZGeneralDigestUserSettings::removeByUserId($userID);
     eZPersistentObject::removeObject(eZUser::definition(), array('contentobject_id' => $userID));
     return true;
 }
開發者ID:brookinsconsulting,項目名稱:ezecosystem,代碼行數:18,代碼來源:ezuser.php

示例13: removeAttributes

 function removeAttributes($removeAttributes = false, $version = false)
 {
     if (is_array($removeAttributes)) {
         $db = eZDB::instance();
         $db->begin();
         foreach ($removeAttributes as $attribute) {
             $attribute->removeThis();
         }
         $db->commit();
     } else {
         $contentClassID = $this->ID;
         if ($version === false) {
             $version = $this->Version;
         }
         $classAttributes = $this->fetchAttributes();
         $db = eZDB::instance();
         $db->begin();
         foreach ($classAttributes as $classAttribute) {
             $dataType = $classAttribute->dataType();
             $dataType->deleteStoredClassAttribute($classAttribute, $version);
         }
         eZPersistentObject::removeObject(eZContentClassAttribute::definition(), array('contentclass_id' => $contentClassID, 'version' => $version));
         $db->commit();
     }
 }
開發者ID:nlenardou,項目名稱:ezpublish,代碼行數:25,代碼來源:ezcontentclass.php

示例14: removeSelected

 static function removeSelected($id)
 {
     eZPersistentObject::removeObject(eZContentClassGroup::definition(), array("id" => $id));
 }
開發者ID:legende91,項目名稱:ez,代碼行數:4,代碼來源:ezcontentclassgroup.php

示例15: removeByID

 static function removeByID( $urlID )
 {
     eZPersistentObject::removeObject( eZURL::definition(),
                                       array( 'id' => $urlID ) );
 }
開發者ID:robinmuilwijk,項目名稱:ezpublish,代碼行數:5,代碼來源:ezurl.php


注:本文中的eZPersistentObject::removeObject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。