function file_entity_file_formatter_file_image_settings

cis7 file_entity.module file_entity_file_formatter_file_image_settings($form, &$form_state, $settings)
cle7 file_entity.module file_entity_file_formatter_file_image_settings($form, &$form_state, $settings)
elmsmedia7 file_entity.module file_entity_file_formatter_file_image_settings($form, &$form_state, $settings)
icor7 file_entity.module file_entity_file_formatter_file_image_settings($form, &$form_state, $settings)
meedjum_blog7 file_entity.module file_entity_file_formatter_file_image_settings($form, &$form_state, $settings)
mooc7 file_entity.module file_entity_file_formatter_file_image_settings($form, &$form_state, $settings)

Implements hook_file_formatter_FORMATTER_settings().

Returns form elements for configuring the 'file_image' formatter.

1 string reference to 'file_entity_file_formatter_file_image_settings'
file_entity_file_formatter_info in sites/all/modules/ulmus/file_entity/file_entity.module
Implements hook_file_formatter_info().

File

sites/all/modules/ulmus/file_entity/file_entity.module, line 1272
Extends Drupal file entities to be fieldable and viewable.

Code

function file_entity_file_formatter_file_image_settings($form, &$form_state, $settings) {
  $element = array();
  $element['image_style'] = array(
    '#title' => t('Image style'),
    '#type' => 'select',
    '#options' => image_style_options(FALSE),
    '#default_value' => $settings['image_style'],
    '#empty_option' => t('None (original image)'),
  );

  // For image files we allow the alt attribute (required in HTML).
  $element['alt'] = array(
    '#title' => t('Alt attribute'),
    '#description' => t('The text to use as value for the <em>img</em> tag <em>alt</em> attribute.'),
    '#type' => 'textfield',
    '#default_value' => $settings['alt'],
  );

  // Allow the setting of the title attribute.
  $element['title'] = array(
    '#title' => t('Title attribute'),
    '#description' => t('The text to use as value for the <em>img</em> tag <em>title</em> attribute.'),
    '#type' => 'textfield',
    '#default_value' => $settings['title'],
  );

  if (module_exists('token')) {
    $element['alt']['#description'] .= t('This field supports tokens.');
    $element['title']['#description'] .= t('This field supports tokens.');
    $element['tokens'] = array(
      '#theme' => 'token_tree',
      '#token_types' => array('file'),
      '#dialog' => TRUE,
    );
  }

  return $element;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.