/** * Retrieve a list of available delivery depends on the filter given * * @param KalturaDeliveryProfileFilter $filter * @param KalturaFilterPager $pager * @return KalturaDeliveryProfileListResponse */ function listAction(KalturaDeliveryProfileFilter $filter = null, KalturaFilterPager $pager = null) { $kparams = array(); if ($filter !== null) { $this->client->addParam($kparams, "filter", $filter->toParams()); } if ($pager !== null) { $this->client->addParam($kparams, "pager", $pager->toParams()); } $this->client->queueServiceActionCall("deliveryprofile", "list", $kparams); if ($this->client->isMultiRequest()) { return $this->client->getMultiRequestResult(); } $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "KalturaDeliveryProfileListResponse"); return $resultObject; }
public function getOrderByMap() { return array_merge(parent::getOrderByMap(), self::$order_by_map); }
/** * Retrieve a list of available delivery depends on the filter given * * @action list * @param KalturaDeliveryProfileFilter $filter * @param KalturaFilterPager $pager * @return KalturaDeliveryProfileListResponse */ function listAction(KalturaDeliveryProfileFilter $filter = null, KalturaFilterPager $pager = null) { if (!$filter) { $filter = new KalturaDeliveryProfileFilter(); } if (!$pager) { $pager = new KalturaFilterPager(); } $delivery = new DeliveryProfileFilter(); $filter->toObject($delivery); DeliveryProfilePeer::setUseCriteriaFilter(false); $c = new Criteria(); $c->add(DeliveryProfilePeer::PARTNER_ID, array(0, kCurrentContext::getCurrentPartnerId()), Criteria::IN); $delivery->attachToCriteria($c); $totalCount = DeliveryProfilePeer::doCount($c); $pager->attachToCriteria($c); $dbList = DeliveryProfilePeer::doSelect($c); DeliveryProfilePeer::setUseCriteriaFilter(true); $objects = KalturaDeliveryProfileArray::fromDbArray($dbList, $this->getResponseProfile()); $response = new KalturaDeliveryProfileListResponse(); $response->objects = $objects; $response->totalCount = $totalCount; return $response; }