Beispiel #1
0
 /**
  * List annotation objects by filter and pager
  * 
  * @action list
  * @param KalturaAnnotationFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaAnnotationListResponse
  */
 function listAction(KalturaAnnotationFilter $filter = null, KalturaFilterPager $pager = null)
 {
     kalturalog::debug("annotation service listAction");
     if (!$filter) {
         $filter = new KalturaAnnotationFilter();
     }
     $c = new Criteria();
     $c->add(AnnotationPeer::STATUS, AnnotationStatus::ANNOTATION_STATUS_READY);
     $c->add(AnnotationPeer::TYPE, AnnotationType::ANNOTATION);
     $annotationFilter = new AnnotationFilter();
     $filter->toObject($annotationFilter);
     $annotationFilter->attachToCriteria($c);
     $count = AnnotationPeer::doCount($c);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $list = AnnotationPeer::doSelect($c);
     $response = new KalturaAnnotationListResponse();
     $response->objects = KalturaAnnotationArray::fromDbArray($list);
     $response->totalCount = $count;
     return $response;
 }