本文整理汇总了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);
}
示例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));
}
}
示例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);
}
示例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);
}
示例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();
}
示例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));
}
示例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();
}
示例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();
}
示例9: removeByUserID
static function removeByUserID($userID)
{
eZPersistentObject::removeObject(eZUserSetting::definition(), array('user_id' => $userID));
}
示例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'));
示例11: removeForNode
static function removeForNode($nodeID)
{
eZPersistentObject::removeObject(eZTipafriendCounter::definition(), array('node_id' => $nodeID));
}
示例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;
}
示例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();
}
}
示例14: removeSelected
static function removeSelected($id)
{
eZPersistentObject::removeObject(eZContentClassGroup::definition(), array("id" => $id));
}
示例15: removeByID
static function removeByID( $urlID )
{
eZPersistentObject::removeObject( eZURL::definition(),
array( 'id' => $urlID ) );
}