Ejemplo n.º 1
0
 /**
  * list batch control commands
  * 
  * @action listCommands
  * @param KalturaControlPanelCommandFilter $filter
  * @param KalturaFilterPager $pager  
  * @return KalturaControlPanelCommandListResponse
  */
 function listCommandsAction(KalturaControlPanelCommandFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaControlPanelCommandFilter();
     }
     $controlPanelCommandFilter = new ControlPanelCommandFilter();
     $filter->toObject($controlPanelCommandFilter);
     $c = new Criteria();
     $controlPanelCommandFilter->attachToCriteria($c);
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $pager->attachToCriteria($c);
     $count = ControlPanelCommandPeer::doCount($c);
     $list = ControlPanelCommandPeer::doSelect($c);
     $newList = KalturaControlPanelCommandArray::fromDbArray($list, $this->getResponseProfile());
     $response = new KalturaControlPanelCommandListResponse();
     $response->objects = $newList;
     $response->totalCount = $count;
     return $response;
 }