/**
  * 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;
 }
 /**
  * @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;
 }
 /**
  * @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;
 }
Beispiel #4
0
 /**
  * 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;
 }
 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());
 }
 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;
 }
 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;
 }
 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;
 }
 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);
 }
 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;
 }
 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;
 }
 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;
 }
Beispiel #13
0
 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);
 }
 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);
 }
 /**
  * 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;
 }
Beispiel #16
0
 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $entryFilter = new QuizEntryFilter();
     $entryFilter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
     $this->toObject($entryFilter);
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $entryFilter->attachToCriteria($c);
     $list = entryPeer::doSelect($c);
     $response = new KalturaQuizListResponse();
     $response->objects = KalturaQuizArray::fromDbArray($list, $responseProfile);
     $response->totalCount = $c->getRecordsCount();
     return $response;
 }
Beispiel #17
0
 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     if ($this->orderBy === null) {
         $this->orderBy = KalturaCategoryOrderBy::DEPTH_ASC;
     }
     $categoryFilter = $this->toObject();
     $c = KalturaCriteria::create(categoryPeer::OM_CLASS);
     $categoryFilter->attachToCriteria($c);
     $pager->attachToCriteria($c);
     $dbList = categoryPeer::doSelect($c);
     $totalCount = $c->getRecordsCount();
     $list = KalturaCategoryArray::fromDbArray($dbList, $responseProfile);
     $response = new KalturaCategoryListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }
Beispiel #18
0
 /**
  * List short link objects by filter and pager
  * 
  * @action list
  * @param KalturaShortLinkFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaShortLinkListResponse
  */
 function listAction(KalturaShortLinkFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaShortLinkFilter();
     }
     $shortLinkFilter = $filter->toFilter($this->getPartnerId());
     $c = new Criteria();
     $shortLinkFilter->attachToCriteria($c);
     $count = ShortLinkPeer::doCount($c);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $list = ShortLinkPeer::doSelect($c);
     $response = new KalturaShortLinkListResponse();
     $response->objects = KalturaShortLinkArray::fromDbArray($list);
     $response->totalCount = $count;
     return $response;
 }
Beispiel #19
0
 public function getListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null)
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
     $c = new Criteria();
     $c->add(kvotePeer::PARTNER_ID, kCurrentContext::$ks_partner_id);
     if ($this->entryIdEqual) {
         $c->add(kvotePeer::ENTRY_ID, $this->entryIdEqual);
     }
     if ($this->userIdEqual) {
         $c->add(kvotePeer::PUSER_ID, $this->userIdEqual);
     }
     $pager->attachToCriteria($c);
     $list = kvotePeer::doSelect($c);
     $response = new KalturaLikeListResponse();
     $response->objects = KalturaLikeArray::fromDbArray($list, $responseProfile);
     $response->totalCount = count($list);
     return $response;
 }
 /**
  * List virus scan profile objects by filter and pager
  * 
  * @action list
  * @param KalturaVirusScanProfileFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaVirusScanProfileListResponse
  */
 function listAction(KalturaVirusScanProfileFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaVirusScanProfileFilter();
     }
     $virusScanProfileFilter = $filter->toObject();
     $c = new Criteria();
     $virusScanProfileFilter->attachToCriteria($c);
     $count = VirusScanProfilePeer::doCount($c);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $list = VirusScanProfilePeer::doSelect($c);
     $response = new KalturaVirusScanProfileListResponse();
     $response->objects = KalturaVirusScanProfileArray::fromDbArray($list);
     $response->totalCount = $count;
     return $response;
 }
 /**
  * List aggregated partner data
  * 
  * @action list
  * @param KalturaDwhHourlyPartnerFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaDwhHourlyPartnerListResponse
  */
 function listAction(KalturaDwhHourlyPartnerFilter $filter, KalturaFilterPager $pager = null)
 {
     $filter->validatePropertyNotNull('aggregatedTimeLessThanOrEqual');
     $filter->validatePropertyNotNull('aggregatedTimeGreaterThanOrEqual');
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $c = new Criteria();
     $dwhHourlyPartnerFilter = $filter->toObject();
     $dwhHourlyPartnerFilter->attachToCriteria($c);
     $count = DwhHourlyPartnerPeer::doCount($c);
     $pager->attachToCriteria($c);
     $list = DwhHourlyPartnerPeer::doSelect($c);
     $response = new KalturaDwhHourlyPartnerListResponse();
     $response->objects = KalturaDwhHourlyPartnerArray::fromDbArray($list, $this->getResponseProfile());
     $response->totalCount = $count;
     return $response;
 }
 /**
  * List bulk upload batch jobs
  * 
  * @param KalturaBulkUploadFilter $bulkUploadFilter 
  * @param KalturaFilterPager $pager 
  * @return KalturaBulkUploadListResponse
  */
 function listAction(KalturaBulkUploadFilter $bulkUploadFilter = null, KalturaFilterPager $pager = null)
 {
     $kparams = array();
     if ($bulkUploadFilter !== null) {
         $this->client->addParam($kparams, "bulkUploadFilter", $bulkUploadFilter->toParams());
     }
     if ($pager !== null) {
         $this->client->addParam($kparams, "pager", $pager->toParams());
     }
     $this->client->queueServiceActionCall("bulkupload_bulk", "list", $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultObject = $this->client->doQueue();
     $this->client->throwExceptionIfError($resultObject);
     $this->client->validateObjectType($resultObject, "KalturaBulkUploadListResponse");
     return $resultObject;
 }
Beispiel #23
0
 /**
  * List metadata objects by filter and pager
  * 
  * @action list
  * @param KalturaMetadataFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaMetadataListResponse
  */
 function listAction(KalturaMetadataFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaMetadataFilter();
     }
     $metadataFilter = new MetadataFilter();
     $filter->toObject($metadataFilter);
     $c = new Criteria();
     $metadataFilter->attachToCriteria($c);
     $count = MetadataPeer::doCount($c);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $list = MetadataPeer::doSelect($c);
     $response = new KalturaMetadataListResponse();
     $response->objects = KalturaMetadataArray::fromDbArray($list);
     $response->totalCount = $count;
     return $response;
 }
Beispiel #24
0
 /**
  * List audit trail objects by filter and pager
  * 
  * @action list
  * @param KalturaAuditTrailFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaAuditTrailListResponse
  */
 function listAction(KalturaAuditTrailFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaAuditTrailFilter();
     }
     $auditTrailFilter = $filter->toObject();
     $c = new Criteria();
     $auditTrailFilter->attachToCriteria($c);
     $count = AuditTrailPeer::doCount($c);
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $pager->attachToCriteria($c);
     $list = AuditTrailPeer::doSelect($c);
     $response = new KalturaAuditTrailListResponse();
     $response->objects = KalturaAuditTrailArray::fromDbArray($list);
     $response->totalCount = $count;
     return $response;
 }
 /**
  * @action search
  * 
  * Action to search tags using a string of 3 letters or more.
  * @param KalturaTagFilter $tagFilter
  * @param KalturaFilterPager $pager
  * @return KalturaTagListResponse
  */
 public function searchAction(KalturaTagFilter $tagFilter, KalturaFilterPager $pager = null)
 {
     if (!$tagFilter) {
         $tagFilter = new KalturaTagFilter();
     }
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $tagFilter->validate();
     $c = KalturaCriteria::create(TagPeer::OM_CLASS);
     $tagCoreFilter = new TagFilter();
     $tagFilter->toObject($tagCoreFilter);
     $tagCoreFilter->attachToCriteria($c);
     $pager->attachToCriteria($c);
     $tags = TagPeer::doSelect($c);
     $searchResponse = new KalturaTagListResponse();
     $searchResponse->objects = KalturaTagArray::fromDbArray($tags);
     $searchResponse->totalCount = $c->getRecordsCount();
     return $searchResponse;
 }
 /**
  * Lists asset parmas of conversion profile by ID
  * 
  * @action list
  * @param KalturaConversionProfileAssetParamsFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaConversionProfileAssetParamsListResponse
  */
 public function listAction(KalturaConversionProfileAssetParamsFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaConversionProfileAssetParamsFilter();
     }
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $assetParamsConversionProfileFilter = $filter->toObject();
     $c = new Criteria();
     $assetParamsConversionProfileFilter->attachToCriteria($c);
     $totalCount = flavorParamsConversionProfilePeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = flavorParamsConversionProfilePeer::doSelect($c);
     $list = KalturaConversionProfileAssetParamsArray::fromDbArray($dbList);
     $response = new KalturaConversionProfileAssetParamsListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }
 /**
  * batch getTransformMetadataObjects action retrieve all metadata objects that requires upgrade and the total count 
  * 
  * @action getTransformMetadataObjects
  * @param int $metadataProfileId The id of the metadata profile
  * @param int $srcVersion The old metadata profile version
  * @param int $destVersion The new metadata profile version
  * @param KalturaFilterPager $pager
  * @return KalturaTransformMetadataResponse
  */
 function getTransformMetadataObjectsAction($metadataProfileId, $srcVersion, $destVersion, KalturaFilterPager $pager = null)
 {
     $response = new KalturaTransformMetadataResponse();
     $c = new Criteria();
     $c->add(MetadataPeer::METADATA_PROFILE_ID, $metadataProfileId);
     $c->add(MetadataPeer::METADATA_PROFILE_VERSION, $srcVersion, Criteria::LESS_THAN);
     $c->add(MetadataPeer::STATUS, KalturaMetadataStatus::VALID);
     $response->lowerVersionCount = MetadataPeer::doCount($c);
     $c = new Criteria();
     $c->add(MetadataPeer::METADATA_PROFILE_ID, $metadataProfileId);
     $c->add(MetadataPeer::METADATA_PROFILE_VERSION, $srcVersion);
     $c->add(MetadataPeer::STATUS, KalturaMetadataStatus::VALID);
     $response->totalCount = MetadataPeer::doCount($c);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $list = MetadataPeer::doSelect($c);
     $response->objects = KalturaMetadataArray::fromDbArray($list);
     return $response;
 }
Beispiel #28
0
 /**
  * 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)
 {
     if (!$filter) {
         $filter = new KalturaMediaInfoFilter();
     }
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $mediaInfoFilter = new MediaInfoFilter();
     $filter->toObject($mediaInfoFilter);
     $c = new Criteria();
     $mediaInfoFilter->attachToCriteria($c);
     $totalCount = mediaInfoPeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = mediaInfoPeer::doSelect($c);
     $list = KalturaMediaInfoArray::fromDbArray($dbList);
     $response = new KalturaMediaInfoListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }
Beispiel #29
0
 /**
  * List file syce objects by filter and pager
  *
  * @action list
  * @param KalturaFileSyncFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaFileSyncListResponse
  */
 function listAction(KalturaFileSyncFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaFileSyncFilter();
     }
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $fileSyncFilter = new FileSyncFilter();
     $filter->toObject($fileSyncFilter);
     $c = new Criteria();
     $fileSyncFilter->attachToCriteria($c);
     $totalCount = FileSyncPeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = FileSyncPeer::doSelect($c);
     $list = KalturaFileSyncArray::fromDbArray($dbList, $this->getResponseProfile());
     $response = new KalturaFileSyncListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }
 /**
  * List flavor params output objects by filter and pager
  * 
  * @action list
  * @param KalturaFlavorParamsOutputFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaFlavorParamsOutputListResponse
  */
 function listAction(KalturaFlavorParamsOutputFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaFlavorParamsOutputFilter();
     }
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $flavorParamsOutputFilter = new assetParamsOutputFilter();
     $filter->toObject($flavorParamsOutputFilter);
     $c = new Criteria();
     $flavorParamsOutputFilter->attachToCriteria($c);
     $totalCount = flavorParamsOutputPeer::doCount($c);
     $pager->attachToCriteria($c);
     $dbList = flavorParamsOutputPeer::doSelect($c);
     $list = KalturaFlavorParamsOutputArray::fromDbArray($dbList);
     $response = new KalturaFlavorParamsOutputListResponse();
     $response->objects = $list;
     $response->totalCount = $totalCount;
     return $response;
 }