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


PHP entry::getReplacedEntryId方法代码示例

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


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

示例1: handleEntryReplacement

 /**
  * @param entry $tempEntry
  */
 public static function handleEntryReplacement(entry $tempEntry)
 {
     $entry = entryPeer::retrieveByPK($tempEntry->getReplacedEntryId());
     if (!$entry) {
         KalturaLog::err("Real entry id [" . $tempEntry->getReplacedEntryId() . "] not found");
         myEntryUtils::deleteEntry($tempEntry, null, true);
         return;
     }
     if ($tempEntry->getStatus() == entryStatus::ERROR_CONVERTING) {
         $entry->setReplacementStatus(entryReplacementStatus::FAILED);
         $entry->save();
         // NOTE: KalturaEntryService::cancelReplace() must be used to reset this status and delete the temp entry
         return;
     }
     switch ($entry->getReplacementStatus()) {
         case entryReplacementStatus::APPROVED_BUT_NOT_READY:
             KalturaLog::log("status changed to ready");
             kEventsManager::raiseEventDeferred(new kObjectReadyForReplacmentEvent($tempEntry));
             break;
         case entryReplacementStatus::READY_BUT_NOT_APPROVED:
             break;
         case entryReplacementStatus::NOT_READY_AND_NOT_APPROVED:
             $entry->setReplacementStatus(entryReplacementStatus::READY_BUT_NOT_APPROVED);
             $entry->save();
             break;
         case entryReplacementStatus::FAILED:
             // Do nothing. KalturaEntryService::cancelReplace() will be used to delete the entry.
             break;
         case entryReplacementStatus::NONE:
         default:
             KalturaLog::err("Real entry id [" . $tempEntry->getReplacedEntryId() . "] replacement canceled");
             myEntryUtils::deleteEntry($tempEntry, null, true);
             break;
     }
 }
开发者ID:GElkayam,项目名称:server,代码行数:38,代码来源:kFlowHelper.php

示例2: onEntryReady

 /**
  * @param entry $entry
  */
 public static function onEntryReady(entry $entry)
 {
     if (!ContentDistributionPlugin::isAllowedPartner($entry->getPartnerId())) {
         return true;
     }
     //no temp entries should be handled
     if ($entry->getDisplayInSearch() == mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM && $entry->getReplacedEntryId()) {
         return true;
     }
     $distributionProfiles = DistributionProfilePeer::retrieveByPartnerId($entry->getPartnerId());
     foreach ($distributionProfiles as $distributionProfile) {
         $entryDistribution = EntryDistributionPeer::retrieveByEntryAndProfileId($entry->getId(), $distributionProfile->getId());
         if ($entryDistribution) {
             KalturaLog::info("Found entry distribution object with id [" . $entryDistribution->getId() . "] for distrinution profle [" . $distributionProfile->getId() . "]");
             self::onEntryDistributionUpdateRequired($entryDistribution);
             continue;
         }
         if ($distributionProfile->getSubmitEnabled() == DistributionProfileActionStatus::AUTOMATIC) {
             self::addEntryDistribution($entry, $distributionProfile, true);
         }
     }
     return true;
 }
开发者ID:DBezemer,项目名称:server,代码行数:26,代码来源:kContentDistributionFlowManager.php

示例3: handleEntryReplacement

 /**
  * @param entry $tempEntry
  */
 public static function handleEntryReplacement(entry $tempEntry)
 {
     KalturaLog::debug("Handling temp entry id [" . $tempEntry->getId() . "] for real entry id [" . $tempEntry->getReplacedEntryId() . "]");
     $entry = entryPeer::retrieveByPK($tempEntry->getReplacedEntryId());
     if (!$entry) {
         KalturaLog::err("Real entry id [" . $tempEntry->getReplacedEntryId() . "] not found");
         myEntryUtils::deleteEntry($tempEntry, null, true);
         return;
     }
     switch ($entry->getReplacementStatus()) {
         case entryReplacementStatus::APPROVED_BUT_NOT_READY:
             KalturaLog::debug("status changed to ready");
             kEventsManager::raiseEventDeferred(new kObjectReadyForReplacmentEvent($tempEntry));
             break;
         case entryReplacementStatus::READY_BUT_NOT_APPROVED:
             break;
         case entryReplacementStatus::NOT_READY_AND_NOT_APPROVED:
             $entry->setReplacementStatus(entryReplacementStatus::READY_BUT_NOT_APPROVED);
             $entry->save();
             break;
         case entryReplacementStatus::NONE:
         default:
             KalturaLog::err("Real entry id [" . $tempEntry->getReplacedEntryId() . "] replacement canceled");
             myEntryUtils::deleteEntry($tempEntry, null, true);
             break;
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:30,代码来源:kFlowHelper.php


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