本文整理汇总了PHP中eZPersistentObject::store方法的典型用法代码示例。如果您正苦于以下问题:PHP eZPersistentObject::store方法的具体用法?PHP eZPersistentObject::store怎么用?PHP eZPersistentObject::store使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZPersistentObject
的用法示例。
在下文中一共展示了eZPersistentObject::store方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: store
function store($fieldFilters = null)
{
parent::store($fieldFilters);
if ($this->OriginalID == 0) {
$this->OriginalID = $this->ID;
parent::store($fieldFilters);
}
}
示例2: store
function store($fieldFilters = null)
{
$dateTime = time();
$user = eZUser::currentUser();
$this->setAttribute('modifier_id', $user->attribute('contentobject_id'));
$this->setAttribute('modified', $dateTime);
parent::store($fieldFilters);
}
示例3: store
function store($fieldFilters = null)
{
if ($this->ContentobjectID == eZUser::anonymousId()) {
eZUser::purgeUserCacheByAnonymousId();
} else {
$handler = eZExpiryHandler::instance();
$handler->setTimestamp('user-discountrules-cache', time());
$handler->store();
}
parent::store($fieldFilters);
}
示例4: store
function store($fieldFilters = null)
{
if ($this->QuestionOriginalID == 0) {
$db = eZDB::instance();
$id = $this->QuestionID;
$question = eZSurveyQuestion::fetch($id);
if (get_class($question) == 'eZSurveyQuestion') {
$this->QuestionOriginalID = $question->attribute('original_id');
}
}
parent::store($fieldFilters);
}
示例5: store
function store($publish = false)
{
if ($publish) {
$originalVersion = $this->attribute('version');
$this->setAttribute('version', eZPDFExport::VERSION_VALID);
}
$user = eZUser::currentUser();
$this->setAttribute('modified', time());
$this->setAttribute('modifier_id', $user->attribute('contentobject_id'));
$db = eZDB::instance();
$db->begin();
parent::store();
if ($publish) {
$this->setAttribute('version', eZPDFExport::VERSION_DRAFT);
$this->remove();
$this->setAttribute('version', $originalVersion);
}
$db->commit();
}
示例6: store
function store($storeAsValid = false)
{
$dateTime = time();
$user = eZUser::currentUser();
if ($this->ID == null) {
parent::store();
return;
}
$db = eZDB::instance();
$db->begin();
if ($storeAsValid) {
$oldStatus = $this->attribute('status');
$this->setAttribute('status', eZRSSExport::STATUS_VALID);
}
$this->setAttribute('modified', $dateTime);
$this->setAttribute('modifier_id', $user->attribute("contentobject_id"));
parent::store();
$db->commit();
if ($storeAsValid) {
$this->setAttribute('status', $oldStatus);
}
}
示例7: store
function store($fieldFilters = null)
{
$db = eZDB::instance();
$db->begin();
// Store the rule itself.
parent::store($fieldFilters);
// Store product categories associated with the rule,
$this->removeProductCategories();
$categories = $this->attribute('product_categories');
if ($categories) {
foreach ($categories as $category) {
$query = sprintf("INSERT INTO ezvatrule_product_category " . "(vatrule_id, product_category_id) VALUES (%d,%d)", $this->ID, $category['id']);
$db->query($query);
}
}
$db->commit();
}
示例8: store
/**
* Stores the eZURLWildcard persistent object
*/
public function store( $fieldFilters = null )
{
eZPersistentObject::store( $fieldFilters );
}
示例9: storeNewRow
function storeNewRow()
{
return parent::store();
}
示例10: store
/**
* if nl user exists update this data to
* (non-PHPdoc)
* @see kernel/classes/eZPersistentObject#store($fieldFilters)
*/
public function store($fieldFilters = null)
{
$newsletterUserObject = $this->getNewsletterUserObject();
if (is_object($newsletterUserObject)) {
$newsletterUserObject->setBlacklisted();
}
parent::store($fieldFilters);
}
示例11: store
function store($fieldFilters = null)
{
$db = eZDB::instance();
$db->begin();
parent::store($fieldFilters);
$this->updateAndStoreModified();
$db->commit();
}
示例12: store
function store($fieldFilters = null)
{
$this->Email = trim($this->Email);
$userID = $this->attribute('contentobject_id');
// Clear memory cache
unset($GLOBALS['eZUserObject_' . $userID]);
$GLOBALS['eZUserObject_' . $userID] = $this;
self::purgeUserCacheByUserId($userID);
parent::store($fieldFilters);
}
示例13: store
function store($fieldFilters = null)
{
eZPersistentObject::store($fieldFilters);
$this->updateCache();
return true;
}
示例14: store
/**
* set Modifed data if somebody store content
* (non-PHPdoc)
* @see kernel/classes/eZPersistentObject#store($fieldFilters)
*/
public function store($fieldFilters = null)
{
$this->setModified();
parent::store($fieldFilters);
}
示例15: storeVersioned
/**
* Stores the current class as a modified version, updates the contentobject_name
* attribute and recreates the class group entries.
*
* @note It will remove classes in the previous and specified version before storing.
*
* @param array $attributes array of attributes
* @param int $version version status
* @since Version 4.3
*/
public function storeVersioned($attributes, $version)
{
$previousVersion = $this->attribute('version');
$db = eZDB::instance();
$db->begin();
// Before removing anything from the attributes, load attribute information
// which might otherwise not accessible when recreating them below.
// See issue #18164
foreach ($attributes as $attribute) {
$attribute->content();
}
$this->removeAttributes(false, $version);
$this->removeAttributes(false, $previousVersion);
$this->remove(false);
$this->setVersion($version, $attributes);
$this->setAttribute("modifier_id", eZUser::currentUser()->attribute("contentobject_id"));
$this->setAttribute("modified", time());
$this->adjustAttributePlacements($attributes);
foreach ($attributes as $attribute) {
$attribute->storeVersioned($version);
}
// Set contentobject_name to something sensible if it is missing
if (count($attributes) > 0 && trim($this->attribute('contentobject_name')) == '') {
$this->setAttribute('contentobject_name', '<' . $attributes[0]->attribute('identifier') . '>');
}
// Recreate class member entries
eZContentClassClassGroup::removeClassMembers($this->ID, $version);
foreach (eZContentClassClassGroup::fetchGroupList($this->ID, $previousVersion) as $classgroup) {
$classgroup->setAttribute('contentclass_version', $version);
$classgroup->store();
}
eZContentClassClassGroup::removeClassMembers($this->ID, $previousVersion);
eZExpiryHandler::registerShutdownFunction();
$handler = eZExpiryHandler::instance();
$time = time();
$handler->setTimestamp('user-class-cache', $time);
$handler->setTimestamp('class-identifier-cache', $time);
$handler->setTimestamp('sort-key-cache', $time);
$handler->store();
eZContentCacheManager::clearAllContentCache();
$this->setAttribute('serialized_name_list', $this->NameList->serializeNames());
$this->setAttribute('serialized_description_list', $this->DescriptionList->serializeNames());
eZPersistentObject::store();
$this->NameList->store($this);
$db->commit();
}