_views_file_status($choice = NULL)
Formats human-readable version of file status.
int|null $choice: (optional) An integer status code. If not set, all statuses are returned. Defaults to NULL.
\Drupal\Core\StringTranslation\TranslatableMarkup|\Drupal\Core\StringTranslation\TranslatableMarkup[] An array of file statuses or a specified status if $choice is set.
function _views_file_status($choice = NULL) { $status = array( 0 => t('Temporary'), FILE_STATUS_PERMANENT => t('Permanent'), ); if (isset($choice)) { return isset($status[$choice]) ? $status[$choice] : t('Unknown'); } return $status; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!file!file.module/function/_views_file_status/8.1.x