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


PHP KalturaFilterPager类代码示例

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


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

示例1: listAction

 /**
  * List all distribution providers
  * 
  * @action list
  * @param KalturaDistributionProviderFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaDistributionProviderListResponse
  */
 function listAction(KalturaDistributionProviderFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaDistributionProviderFilter();
     }
     $c = new Criteria();
     if ($filter instanceof KalturaGenericDistributionProviderFilter) {
         $genericDistributionProviderFilter = new GenericDistributionProviderFilter();
         $filter->toObject($genericDistributionProviderFilter);
         $genericDistributionProviderFilter->attachToCriteria($c);
     }
     $count = GenericDistributionProviderPeer::doCount($c);
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $pager->attachToCriteria($c);
     $list = GenericDistributionProviderPeer::doSelect($c);
     $response = new KalturaDistributionProviderListResponse();
     $response->objects = KalturaDistributionProviderArray::fromDbArray($list, $this->getResponseProfile());
     $response->totalCount = $count;
     $syndicationProvider = new KalturaSyndicationDistributionProvider();
     $syndicationProvider->fromObject(SyndicationDistributionProvider::get());
     $response->objects[] = $syndicationProvider;
     $response->totalCount++;
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaContentDistributionProvider');
     foreach ($pluginInstances as $pluginInstance) {
         $provider = $pluginInstance->getKalturaProvider();
         if ($provider) {
             $response->objects[] = $provider;
             $response->totalCount++;
         }
     }
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:42,代码来源:DistributionProviderService.php

示例2: listByPartnerAction

 /**
  * @action listByPartner
  * @param KalturaPartnerFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaStorageProfileListResponse
  */
 public function listByPartnerAction(KalturaPartnerFilter $filter = null, KalturaFilterPager $pager = null)
 {
     $c = new Criteria();
     if (!is_null($filter)) {
         $partnerFilter = new partnerFilter();
         $filter->toObject($partnerFilter);
         $partnerFilter->set('_gt_id', 0);
         $partnerCriteria = new Criteria();
         $partnerFilter->attachToCriteria($partnerCriteria);
         $partnerCriteria->setLimit(1000);
         $partnerCriteria->clearSelectColumns();
         $partnerCriteria->addSelectColumn(PartnerPeer::ID);
         $stmt = PartnerPeer::doSelectStmt($partnerCriteria);
         if ($stmt->rowCount() < 1000) {
             $partnerIds = $stmt->fetchAll(PDO::FETCH_COLUMN);
             $c->add(StorageProfilePeer::PARTNER_ID, $partnerIds, Criteria::IN);
         }
     }
     if (is_null($pager)) {
         $pager = new KalturaFilterPager();
     }
     $totalCount = StorageProfilePeer::doCount($c);
     $pager->attachToCriteria($c);
     $list = StorageProfilePeer::doSelect($c);
     $newList = KalturaStorageProfileArray::fromStorageProfileArray($list);
     $response = new KalturaStorageProfileListResponse();
     $response->totalCount = $totalCount;
     $response->objects = $newList;
     return $response;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:36,代码来源:StorageProfileService.php

示例3: getListResponse

 /**
  * @param KalturaFilterPager $pager
  * @param KalturaDetachedResponseProfile $responseProfile
  * @return KalturaListResponse
  */
 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $response = new KalturaUserEntryListResponse();
     if (in_array(kCurrentContext::getCurrentSessionType(), array(kSessionBase::SESSION_TYPE_NONE, kSessionBase::SESSION_TYPE_WIDGET))) {
         $response->totalCount = 0;
         return $response;
     }
     $c = new Criteria();
     if (!is_null($this->userIdEqualCurrent) && $this->userIdEqualCurrent) {
         $this->userIdEqual = kCurrentContext::getCurrentKsKuserId();
     } else {
         $this->fixFilterUserId();
     }
     $userEntryFilter = $this->toObject();
     $userEntryFilter->attachToCriteria($c);
     $pager->attachToCriteria($c);
     $list = UserEntryPeer::doSelect($c);
     $resultCount = count($list);
     if ($resultCount && $resultCount < $pager->pageSize) {
         $totalCount = ($pager->pageIndex - 1) * $pager->pageSize + $resultCount;
     } else {
         KalturaFilterPager::detachFromCriteria($c);
         $totalCount = UserEntryPeer::doCount($c);
     }
     $response->totalCount = $totalCount;
     $response->objects = KalturaUserEntryArray::fromDbArray($list, $responseProfile);
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:33,代码来源:KalturaUserEntryFilter.php

示例4: listAction

 /**
  * List media info objects by filter and pager
  * 
  * @action list
  * @param KalturaMediaInfoFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaMediaInfoListResponse
  */
 function listAction(KalturaMediaInfoFilter $filter = null, KalturaFilterPager $pager = null)
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
     if (!$filter) {
         $filter = new KalturaMediaInfoFilter();
     }
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $mediaInfoFilter = new MediaInfoFilter();
     $filter->toObject($mediaInfoFilter);
     if ($filter->flavorAssetIdEqual) {
         // Since media_info table does not have partner_id column, enforce partner by getting the asset
         if (!assetPeer::retrieveById($filter->flavorAssetIdEqual)) {
             throw new KalturaAPIException(KalturaErrors::FLAVOR_ASSET_ID_NOT_FOUND, $filter->flavorAssetIdEqual);
         }
     }
     $c = new Criteria();
     $mediaInfoFilter->attachToCriteria($c);
     $totalCount = mediaInfoPeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = mediaInfoPeer::doSelect($c);
     $list = KalturaMediaInfoArray::fromDbArray($dbList, $this->getResponseProfile());
     $response = new KalturaMediaInfoListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:36,代码来源:MediaInfoService.php

示例5: doGetListResponse

 protected function doGetListResponse(KalturaFilterPager $pager, $type = null)
 {
     $this->validateEntryIdFiltered();
     $this->translateUserIds();
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     if ($type) {
         $c->add(CuePointPeer::TYPE, $type);
     }
     $entryIds = null;
     if ($this->entryIdEqual) {
         $entryIds = array($this->entryIdEqual);
     } else {
         if ($this->entryIdIn) {
             $entryIds = explode(',', $this->entryIdIn);
         }
     }
     if (!is_null($entryIds)) {
         $entryIds = entryPeer::filterEntriesByPartnerOrKalturaNetwork($entryIds, kCurrentContext::getCurrentPartnerId());
         if (!$entryIds) {
             return array(array(), 0);
         }
         $this->entryIdEqual = null;
         $this->entryIdIn = implode(',', $entryIds);
     }
     $cuePointFilter = $this->toObject();
     $cuePointFilter->attachToCriteria($c);
     $pager->attachToCriteria($c);
     $list = CuePointPeer::doSelect($c);
     return array($list, $c->getRecordsCount());
 }
开发者ID:AdiTal,项目名称:server,代码行数:30,代码来源:KalturaCuePointFilter.php

示例6: getListResponse

 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $fileAssetFilter = $this->toObject();
     $c = new Criteria();
     $fileAssetFilter->attachToCriteria($c);
     $totalCount = FileAssetPeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = FileAssetPeer::doSelect($c);
     $response = new KalturaFileAssetListResponse();
     $response->objects = KalturaFileAssetArray::fromDbArray($dbList, $responseProfile);
     $response->totalCount = $totalCount;
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:13,代码来源:KalturaFileAssetFilter.php

示例7: getListResponse

 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $permissionItemFilter = $this->toObject();
     $c = new Criteria();
     $permissionItemFilter->attachToCriteria($c);
     $count = PermissionItemPeer::doCount($c);
     $pager->attachToCriteria($c);
     $list = PermissionItemPeer::doSelect($c);
     $response = new KalturaPermissionItemListResponse();
     $response->objects = KalturaPermissionItemArray::fromDbArray($list, $responseProfile);
     $response->totalCount = $count;
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:13,代码来源:KalturaPermissionItemFilter.php

示例8: getListResponse

 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $c = new Criteria();
     $entryDistributionFilter = $this->toObject();
     $entryDistributionFilter->attachToCriteria($c);
     $count = EntryDistributionPeer::doCount($c);
     $pager->attachToCriteria($c);
     $list = EntryDistributionPeer::doSelect($c);
     $response = new KalturaEntryDistributionListResponse();
     $response->objects = KalturaEntryDistributionArray::fromDbArray($list, $responseProfile);
     $response->totalCount = $count;
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:13,代码来源:KalturaEntryDistributionFilter.php

示例9: doGetListResponse

 protected function doGetListResponse(KalturaFilterPager $pager, $type = null)
 {
     $c = new Criteria();
     if ($type) {
         $c->add(ServerNodePeer::TYPE, $type);
     }
     $serverNodeFilter = $this->toObject();
     $serverNodeFilter->attachToCriteria($c);
     $pager->attachToCriteria($c);
     $list = ServerNodePeer::doSelect($c);
     $totalCount = count($list);
     return array($list, $totalCount);
 }
开发者ID:DBezemer,项目名称:server,代码行数:13,代码来源:KalturaServerNodeFilter.php

示例10: getListResponse

 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $accessControlFilter = $this->toObject();
     $c = new Criteria();
     $accessControlFilter->attachToCriteria($c);
     $totalCount = accessControlPeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = accessControlPeer::doSelect($c);
     $list = KalturaAccessControlArray::fromDbArray($dbList, $responseProfile);
     $response = new KalturaAccessControlListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:KalturaAccessControlFilter.php

示例11: getListResponse

 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $assetParamsConversionProfileFilter = $this->toObject();
     $c = new Criteria();
     $assetParamsConversionProfileFilter->attachToCriteria($c);
     $totalCount = flavorParamsConversionProfilePeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = flavorParamsConversionProfilePeer::doSelect($c);
     $list = KalturaConversionProfileAssetParamsArray::fromDbArray($dbList, $responseProfile);
     $response = new KalturaConversionProfileAssetParamsListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:KalturaConversionProfileAssetParamsFilter.php

示例12: getListResponse

 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $userLoginDataFilter = $this->toObject();
     $c = new Criteria();
     $userLoginDataFilter->attachToCriteria($c);
     $totalCount = UserLoginDataPeer::doCount($c);
     $pager->attachToCriteria($c);
     $list = UserLoginDataPeer::doSelect($c);
     $newList = KalturaUserLoginDataArray::fromDbArray($list, $responseProfile);
     $response = new KalturaUserLoginDataListResponse();
     $response->totalCount = $totalCount;
     $response->objects = $newList;
     return $response;
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:KalturaUserLoginDataFilter.php

示例13: doGetListResponse

 protected function doGetListResponse(KalturaFilterPager $pager, array $types = null)
 {
     $this->validateEntryIdFiltered();
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
     // verify access to the relevant entries - either same partner as the KS or kaltura network
     if ($this->entryIdEqual) {
         $entryIds = array($this->entryIdEqual);
     } else {
         if ($this->entryIdIn) {
             $entryIds = explode(',', $this->entryIdIn);
         } else {
             throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL, 'KalturaAssetFilter::entryIdEqual/KalturaAssetFilter::entryIdIn');
         }
     }
     $entryIds = array_slice($entryIds, 0, baseObjectFilter::getMaxInValues());
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     $c->addAnd(entryPeer::ID, $entryIds, Criteria::IN);
     $criterionPartnerOrKn = $c->getNewCriterion(entryPeer::PARTNER_ID, kCurrentContext::getCurrentPartnerId());
     $criterionPartnerOrKn->addOr($c->getNewCriterion(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_KALTURA_NETWORK));
     $c->addAnd($criterionPartnerOrKn);
     $dbEntries = entryPeer::doSelect($c);
     if (!$dbEntries) {
         return array(array(), 0);
     }
     $entryIds = array();
     foreach ($dbEntries as $dbEntry) {
         $entryIds[] = $dbEntry->getId();
     }
     $this->entryIdEqual = null;
     $this->entryIdIn = implode(',', $entryIds);
     // get the flavors
     $flavorAssetFilter = new AssetFilter();
     $this->toObject($flavorAssetFilter);
     $c = new Criteria();
     $flavorAssetFilter->attachToCriteria($c);
     if ($types) {
         $c->add(assetPeer::TYPE, $types, Criteria::IN);
     }
     $pager->attachToCriteria($c);
     $list = assetPeer::doSelect($c);
     $resultCount = count($list);
     if ($resultCount && $resultCount < $pager->pageSize) {
         $totalCount = ($pager->pageIndex - 1) * $pager->pageSize + $resultCount;
     } else {
         KalturaFilterPager::detachFromCriteria($c);
         $totalCount = assetPeer::doCount($c);
     }
     myDbHelper::$use_alternative_con = null;
     return array($list, $totalCount);
 }
开发者ID:visomar,项目名称:server,代码行数:50,代码来源:KalturaAssetFilter.php

示例14: doGetListResponse

 protected function doGetListResponse(KalturaFilterPager $pager, array $types = null)
 {
     $flavorParamsFilter = $this->toObject();
     $c = new Criteria();
     $flavorParamsFilter->attachToCriteria($c);
     $pager->attachToCriteria($c);
     if ($types) {
         $c->add(assetParamsPeer::TYPE, $types, Criteria::IN);
     }
     $list = assetParamsPeer::doSelect($c);
     $c->setLimit(null);
     $totalCount = assetParamsPeer::doCount($c);
     return array($list, $totalCount);
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:KalturaAssetParamsFilter.php

示例15: searchAction

 /**
  * Search caption asset items by filter, pager and free text
  * 
  * @action search
  * @param KalturaBaseEntryFilter $entryFilter
  * @param KalturaCaptionAssetItemFilter $captionAssetItemFilter
  * @param KalturaFilterPager $captionAssetItemPager
  * @return KalturaCaptionAssetItemListResponse
  */
 function searchAction(KalturaBaseEntryFilter $entryFilter = null, KalturaCaptionAssetItemFilter $captionAssetItemFilter = null, KalturaFilterPager $captionAssetItemPager = null)
 {
     if (!$captionAssetItemPager) {
         $captionAssetItemPager = new KalturaFilterPager();
     }
     if (!$captionAssetItemFilter) {
         $captionAssetItemFilter = new KalturaCaptionAssetItemFilter();
     }
     $captionAssetItemCoreFilter = new CaptionAssetItemFilter();
     $captionAssetItemFilter->toObject($captionAssetItemCoreFilter);
     if ($entryFilter) {
         $entryCoreFilter = new entryFilter();
         $entryFilter->toObject($entryCoreFilter);
         $this->addEntryAdvancedSearchFilter($captionAssetItemFilter, $entryCoreFilter);
         $entryCriteria = KalturaCriteria::create(entryPeer::OM_CLASS);
         $entryCoreFilter->attachToCriteria($entryCriteria);
         $entryCriteria->applyFilters();
         $entryIds = $entryCriteria->getFetchedIds();
         if (!$entryIds || !count($entryIds)) {
             $entryIds = array('NOT_EXIST');
         }
         $captionAssetItemCoreFilter->setEntryIdIn($entryIds);
     }
     $captionAssetItemCriteria = KalturaCriteria::create(CaptionAssetItemPeer::OM_CLASS);
     $captionAssetItemCoreFilter->attachToCriteria($captionAssetItemCriteria);
     $captionAssetItemPager->attachToCriteria($captionAssetItemCriteria);
     $dbList = CaptionAssetItemPeer::doSelect($captionAssetItemCriteria);
     $list = KalturaCaptionAssetItemArray::fromDbArray($dbList);
     $response = new KalturaCaptionAssetItemListResponse();
     $response->objects = $list;
     $response->totalCount = $captionAssetItemCriteria->getRecordsCount();
     return $response;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:42,代码来源:CaptionAssetItemService.php


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