You are here

function kaltura_get_my_entries in Kaltura 5

Same name and namespace in other branches
  1. 6.2 includes/kaltura.admin.inc \kaltura_get_my_entries()
  2. 6 includes/kaltura.admin.inc \kaltura_get_my_entries()
  3. 7.2 includes/kaltura.admin.inc \kaltura_get_my_entries()
1 call to kaltura_get_my_entries()
kaltura_import_entries_page in includes/kaltura.admin.inc

File

includes/kaltura.admin.inc, line 626

Code

function kaltura_get_my_entries($filter, $page_size = 30, $page = 1) {
  if (!is_object($filter) && gettype($filter) == 'KalturaEntryFilter') {
    $filter = new KalturaEntryFilter();
  }
  $session_user = KalturaHelpers::getSessionUser();
  $kaltura_client = KalturaHelpers::getKalturaClient();
  $result = $kaltura_client
    ->listMyEntries($session_user, $filter, 0, $page_size, $page);
  if ($result['result']['count'] > 0) {
    $count = $result['result']['count'];
    $each_page = $result['result']['page_size'];
    if (is_array($result['result']['entries']) && count($result['result']['entries'])) {
      foreach ($result['result']['entries'] as $entry) {
        $returned_entries[$entry['id']] = array(
          'id' => $entry['id'],
          'name' => $entry['name'],
          'type' => $entry['type'],
        );
      }
    }
    return array(
      $count,
      $each_page,
      $returned_entries,
    );
  }
  else {
    return NULL;
  }
}