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


PHP assetPeer::retrieveReadyFlavorsIdsByEntryId方法代码示例

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


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

示例1: initFlavorIds

 protected function initFlavorIds()
 {
     $flavorIds = $this->getRequestParameter("flavorIds", null);
     if (!is_null($flavorIds)) {
         $this->flavorIds = explode(',', $flavorIds);
     }
     $flavorId = $this->getRequestParameter("flavorId", null);
     if (!is_null($flavorId)) {
         $this->flavorIds = array($flavorId);
     }
     if (!is_null($this->flavorIds)) {
         return;
     }
     $flavorParamIds = $this->getRequestParameter("flavorParamIds", null);
     if (!is_null($flavorParamIds)) {
         $this->flavorParamsIds = explode(',', $flavorParamIds);
     }
     $flavorParamId = $this->getRequestParameter("flavorParamId", null);
     if (!is_null($flavorParamId)) {
         $this->flavorParamsIds = array($flavorParamId);
     }
     if (is_null($this->flavorParamsIds)) {
         return;
     }
     $this->flavorParamsIds = $this->secureEntryHelper->filterAllowedFlavorParams($this->flavorParamsIds);
     if (is_null($this->flavorParamsIds)) {
         return;
     }
     $this->flavorIds = assetPeer::retrieveReadyFlavorsIdsByEntryId($this->entryId, $this->flavorParamsIds);
 }
开发者ID:AdiTal,项目名称:server,代码行数:30,代码来源:playManifestAction.class.php

示例2: assignFlavorAssets

 /**
  * @param EntryDistribution $entryDistribution
  * @param entry $entry
  * @param DistributionProfile $distributionProfile
  * @return boolean true if the list of flavors modified
  */
 public static function assignFlavorAssets(EntryDistribution $entryDistribution, entry $entry, DistributionProfile $distributionProfile)
 {
     $submittingStatuses = array(EntryDistributionStatus::PENDING, EntryDistributionStatus::QUEUED, EntryDistributionStatus::SUBMITTING, EntryDistributionStatus::IMPORT_SUBMITTING, EntryDistributionStatus::ERROR_SUBMITTING);
     // if not in first submmiting status then it's an update and need to check if update is supported.
     if (!in_array($entryDistribution->getStatus(), $submittingStatuses)) {
         $distributionProvider = $distributionProfile->getProvider();
         if (!$distributionProvider) {
             KalturaLog::log("Entry distribution [" . $entryDistribution->getId() . "] provider not found");
             return false;
         }
         if (!$distributionProvider->isUpdateEnabled() || !$distributionProvider->isMediaUpdateEnabled()) {
             KalturaLog::log("Entry distribution [" . $entryDistribution->getId() . "] provider [" . $distributionProvider->getName() . "] does not support update");
             return false;
         }
     }
     $requiredFlavorParamsIds = $distributionProfile->getRequiredFlavorParamsIdsArray();
     $optionalFlavorParamsIds = $distributionProfile->getOptionalFlavorParamsIdsArray();
     $flavorParamsIds = array_merge($requiredFlavorParamsIds, $optionalFlavorParamsIds);
     $flavorAssetIds = array();
     if (!is_array($flavorParamsIds)) {
         return false;
     }
     $originalList = $entryDistribution->getFlavorAssetIds();
     // remove deleted flavor assets
     if ($originalList) {
         $assignedFlavorAssetIds = explode(',', $originalList);
         $assignedFlavorAssets = assetPeer::retrieveByIds($assignedFlavorAssetIds);
         foreach ($assignedFlavorAssets as $assignedFlavorAsset) {
             if (in_array($assignedFlavorAsset->getFlavorParamsId(), $flavorParamsIds)) {
                 $flavorAssetIds[] = $assignedFlavorAsset->getId();
             }
         }
     }
     // adds added flavor assets
     $newFlavorAssetIds = assetPeer::retrieveReadyFlavorsIdsByEntryId($entry->getId(), $flavorParamsIds);
     foreach ($newFlavorAssetIds as $newFlavorAssetId) {
         $flavorAssetIds[] = $newFlavorAssetId;
     }
     $entryDistribution->setFlavorAssetIds($flavorAssetIds);
     return $originalList != $entryDistribution->getFlavorAssetIds();
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:47,代码来源:kContentDistributionManager.php

示例3: initFlavorIds

 protected function initFlavorIds()
 {
     $flavorIdsStr = $this->getRequestParameter("flavorIds", null);
     if ($flavorIdsStr) {
         $this->flavorIds = explode(",", $flavorIdsStr);
     }
     $this->flavorId = $this->getRequestParameter("flavorId", null);
     if (!$this->flavorId) {
         $flavorParamIds = $this->getRequestParameter("flavorParamIds", null);
         if ($flavorParamIds !== null) {
             $this->flavorIds = assetPeer::retrieveReadyFlavorsIdsByEntryId($this->entry->getId(), explode(",", $flavorParamIds));
             if (!$this->flavorIds || count($this->flavorIds) == 0) {
                 KExternalErrors::dieError(KExternalErrors::FLAVOR_NOT_FOUND);
             }
         } else {
             $flavorParamId = $this->getRequestParameter("flavorParamId", null);
             if ($flavorParamId || $flavorParamId === "0") {
                 $flavorAsset = assetPeer::retrieveByEntryIdAndParams($this->entry->getId(), $flavorParamId);
                 if (!$flavorAsset) {
                     KExternalErrors::dieError(KExternalErrors::FLAVOR_NOT_FOUND);
                 }
                 $this->flavorId = $flavorAsset->getId();
             }
         }
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:26,代码来源:playManifestAction.class.php


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