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;
 }
 /**
  * Lists permission item objects that are associated with an account.
  * 
  * @action list
  * @param KalturaPermissionItemFilter $filter A filter used to exclude specific types of permission items
  * @param KalturaFilterPager $pager A limit for the number of records to display on a page
  * @return KalturaPermissionItemListResponse The list of permission item objects
  */
 public function listAction(KalturaPermissionItemFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaPermissionItemFilter();
     }
     $permissionItemFilter = $filter->toObject();
     $c = new Criteria();
     $permissionItemFilter->attachToCriteria($c);
     $count = PermissionItemPeer::doCount($c);
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $pager->attachToCriteria($c);
     $list = PermissionItemPeer::doSelect($c);
     $response = new KalturaPermissionItemListResponse();
     $response->objects = KalturaPermissionItemArray::fromDbArray($list);
     $response->totalCount = $count;
     return $response;
 }