You are here

function file_entity_generate_file_form in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 7.3 file_entity.devel_generate.inc \file_entity_generate_file_form()

Devel generate file form.

Options for Devel generate file integration.

1 string reference to 'file_entity_generate_file_form'
file_entity_menu in ./file_entity.module
Implements hook_menu().

File

./file_entity.devel_generate.inc, line 13
Devel generate integration for the File Entity module.

Code

function file_entity_generate_file_form() {
  $form['count'] = array(
    '#type' => 'textfield',
    '#title' => t('How many files would you like to generate?'),
    '#default_value' => 50,
    '#size' => 4,
  );
  $form['file_types'] = array(
    '#type' => 'select',
    '#title' => t('File types'),
    '#description' => t('Restrict files to these file types.'),
    '#options' => file_entity_type_get_names() + array(
      FILE_TYPE_NONE => t('Undetermined'),
    ),
    '#multiple' => TRUE,
  );
  $form['delete'] = array(
    '#type' => 'checkbox',
    '#title' => t('Delete existing files in specified file types before generating new files.'),
    '#default_value' => FALSE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Generate'),
  );
  return $form;
}