Exemplo n.º 1
0
 public function getTypeListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null, array $types = null)
 {
     list($list, $totalCount) = $this->doGetListResponse($pager, $types);
     $response = new KalturaCaptionAssetListResponse();
     $response->objects = KalturaCaptionAssetArray::fromDbArray($list, $responseProfile);
     $response->totalCount = $totalCount;
     return $response;
 }
 /**
  * List caption Assets by filter and pager
  * 
  * @action list
  * @param KalturaAssetFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaCaptionAssetListResponse
  */
 function listAction(KalturaAssetFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaAssetFilter();
     }
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $captionAssetFilter = new AssetFilter();
     $filter->toObject($captionAssetFilter);
     $c = new Criteria();
     $captionAssetFilter->attachToCriteria($c);
     $types = KalturaPluginManager::getExtendedTypes(assetPeer::OM_CLASS, CaptionPlugin::getAssetTypeCoreValue(CaptionAssetType::CAPTION));
     $c->add(assetPeer::TYPE, $types, Criteria::IN);
     $totalCount = assetPeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = assetPeer::doSelect($c);
     $list = KalturaCaptionAssetArray::fromDbArray($dbList);
     $response = new KalturaCaptionAssetListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }