You are here

function _views_file_status in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 8.3 modules/file.views.inc \_views_file_status()
  2. 6.3 modules/system.views.inc \_views_file_status()
  3. 7.3 modules/system.views.inc \_views_file_status()

Related topics

2 calls to _views_file_status()
views_handler_field_file_status::render in modules/system/views_handler_field_file_status.inc
Render the field.
views_handler_filter_file_status::get_value_options in modules/system/views_handler_filter_file_status.inc
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

File

modules/system.views.inc, line 213
Provide views data and handlers for system tables that are not represented by their own module.

Code

function _views_file_status($choice = NULL) {
  $status = array(
    FILE_STATUS_TEMPORARY => t('Temporary'),
    FILE_STATUS_PERMANENT => t('Permanent'),
  );
  if (isset($choice)) {
    return isset($status[$choice]) ? $status[$choice] : t('Unknown');
  }
  return $status;
}