You are here

function hook_scald_add_form in Scald: Media Management made easy 7

Provides a form using to add an atom.

@codingStandardsIgnoreStart

Parameters

array $form: The form array.

array $form_state: The form state array.

Related topics

4 functions implement hook_scald_add_form()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

scald_audio_scald_add_form in modules/providers/scald_audio/scald_audio.module
Implements hook_scald_add_form().
scald_flash_scald_add_form in modules/providers/scald_flash/scald_flash.module
scald_image_scald_add_form in modules/providers/scald_image/scald_image.module
Implements hook_scald_add_form().
scald_video_scald_add_form in modules/providers/scald_video/scald_video.module
Implements hook_scald_add_form().

File

./scald.api.php, line 525
Hooks related to Scald atoms and providers.

Code

function hook_scald_add_form(&$form, &$form_state) {

  // @codingStandardsIgnoreEnd
  $defaults = scald_atom_defaults('image');
  $form['file'] = array(
    '#type' => $defaults->upload_type,
    '#title' => t('Image'),
    '#upload_location' => 'public://atoms/images/',
    '#upload_validators' => array(
      'file_validate_extensions' => array(
        'jpg jpeg png gif',
      ),
    ),
  );
}