当前位置: 首页>>代码示例>>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;未经允许,请勿转载。