当前位置: 首页>>代码示例>>PHP>>正文


PHP BaseObject::getColumnsOldValue方法代码示例

本文整理汇总了PHP中BaseObject::getColumnsOldValue方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseObject::getColumnsOldValue方法的具体用法?PHP BaseObject::getColumnsOldValue怎么用?PHP BaseObject::getColumnsOldValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseObject的用法示例。


在下文中一共展示了BaseObject::getColumnsOldValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: objectChanged

 public function objectChanged(BaseObject $object, array $modifiedColumns)
 {
     $tagsIdsToRemove = array();
     $oldTags = $object->getColumnsOldValue(self::getClassConstValue(get_class($object->getPeer()), self::TAGS_FIELD_NAME));
     if ($oldTags && $oldTags != "") {
         $tagsIdsToRemove = $this->checkExistForDelete($object, $oldTags);
     }
     $tagsToRemove = TagPeer::retrieveByPKs($tagsIdsToRemove);
     foreach ($tagsToRemove as $tagToRemove) {
         $tagToRemove->delete();
     }
     $tagsToAdd = $this->checkExistsForAdd($object);
     $this->addTags($tagsToAdd, $this->getObjectIdByClassName(get_class($object)), $object->getPartnerId());
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:14,代码来源:kTagFlowManager.php

示例2: shouldConsumeChangedEvent

 public function shouldConsumeChangedEvent(BaseObject $object, array $modifiedColumns)
 {
     if ($object instanceof entry && in_array(entryPeer::STATUS, $modifiedColumns) && ($object->getStatus() == entryStatus::READY || $object->getStatus() == entryStatus::ERROR_CONVERTING) && $object->getReplacedEntryId()) {
         return true;
     }
     if ($object instanceof UploadToken && in_array(UploadTokenPeer::STATUS, $modifiedColumns) && $object->getStatus() == UploadToken::UPLOAD_TOKEN_FULL_UPLOAD) {
         return true;
     }
     if ($object instanceof flavorAsset && in_array(assetPeer::STATUS, $modifiedColumns)) {
         return true;
     }
     if ($object instanceof BatchJob && $object->getJobType() == BatchJobType::BULKUPLOAD && $object->getStatus() == BatchJob::BATCHJOB_STATUS_ABORTED && in_array(BatchJobPeer::STATUS, $modifiedColumns) && in_array($object->getColumnsOldValue(BatchJobPeer::STATUS), BatchJobPeer::getClosedStatusList())) {
         return true;
     }
     if ($object instanceof UserRole && in_array(UserRolePeer::PERMISSION_NAMES, $modifiedColumns)) {
         return true;
     }
     if ($object instanceof FileSync && in_array(FileSyncPeer::STATUS, $modifiedColumns) && $object->getStatus() == FileSync::FILE_SYNC_STATUS_DELETED) {
         return true;
     }
     return false;
 }
开发者ID:DBezemer,项目名称:server,代码行数:22,代码来源:kFlowManager.php

示例3: objectChanged

 public function objectChanged(BaseObject $object, array $modifiedColumns)
 {
     $privacyContexts = null;
     if ($object instanceof entry) {
         $criteria = new Criteria();
         $criteria->add(categoryEntryPeer::ENTRY_ID, $object->getId());
         $categoryEntries = categoryEntryPeer::doSelect($criteria);
         $privacyContexts = array(self::NULL_PC);
         if (count($categoryEntries)) {
             foreach ($categoryEntries as $categoryEntry) {
                 /* @var $categoryEntry categoryEntry */
                 if ($categoryEntry->getPrivacyContext() != "") {
                     $privacyContexts = array_merge($privacyContexts, self::trimObjectTags($categoryEntry->getPrivacyContext()));
                 } else {
                     $privacyContexts[] = kEntitlementUtils::DEFAULT_CONTEXT;
                 }
             }
             $privacyContexts = array_unique($privacyContexts);
         }
     }
     $oldTags = $object->getColumnsOldValue(self::getClassConstValue(get_class($object->getPeer()), self::TAGS_FIELD_NAME));
     $newTags = $object->getTags();
     $tagsForDelete = implode(',', array_diff(explode(',', $oldTags), explode(',', $newTags)));
     $tagsForUpdate = implode(',', array_diff(explode(',', $newTags), explode(',', $oldTags)));
     if ($oldTags && $oldTags != "") {
         self::decrementExistingTagsInstanceCount($tagsForDelete, $object->getPartnerId(), get_class($object), $privacyContexts);
     }
     self::addOrIncrementTags($tagsForUpdate, $object->getPartnerId(), get_class($object), $privacyContexts);
 }
开发者ID:DBezemer,项目名称:server,代码行数:29,代码来源:kTagFlowManager.php


注:本文中的BaseObject::getColumnsOldValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。