You are here

function file_entity_file_operations in File Entity (fieldable files) 7.3

Same name and namespace in other branches
  1. 7.2 file_entity.module \file_entity_file_operations()

Implements hook_file_operations().

File

./file_entity.module, line 2246
Extends Drupal file entities to be fieldable and viewable.

Code

function file_entity_file_operations() {
  $operations = array(
    'permanent' => array(
      'label' => t('Indicate that the selected files are permanent and should not be deleted'),
      'callback' => 'file_entity_mass_update',
      'callback arguments' => array(
        'updates' => array(
          'status' => FILE_STATUS_PERMANENT,
        ),
      ),
    ),
    'temporary' => array(
      'label' => t('Indicate that the selected files are temporary and should be removed during cron runs'),
      'callback' => 'file_entity_mass_update',
      'callback arguments' => array(
        'updates' => array(
          'status' => 0,
        ),
      ),
    ),
    'delete' => array(
      'label' => t('Delete selected files'),
      'callback' => NULL,
    ),
  );
  return $operations;
}