You are here

function node_gallery_handler_field_fid::options_form in Node Gallery 6.2

File

includes/node_gallery_handler_field_fid.inc, line 24
node_gallery_handler_field_fid.inc

Class

node_gallery_handler_field_fid
@file node_gallery_handler_field_fid.inc

Code

function options_form(&$form, &$form_state) {
  $configs = node_gallery_get_config();
  foreach ($configs as $gallery_type => $config) {
    $options[$gallery_type] = $config['name'];
  }
  parent::options_form($form, $form_state);
  $form['node_gallery_setting'] = array(
    '#title' => t('Node Gallery Setting'),
    '#description' => t('Specify which node gallery settings you want to use.'),
    '#type' => 'select',
    '#default_value' => $this->options['node_gallery_setting'],
    '#options' => $options,
  );
  $form['view_mode'] = array(
    '#title' => t('Image List View Mode'),
    '#description' => t('Specify which view mode you want to use to display image list.'),
    '#type' => 'select',
    '#default_value' => $this->options['view_mode'],
    '#options' => drupal_map_assoc(array(
      NODE_GALLERY_VIEW_TEASER,
      NODE_GALLERY_VIEW_IMAGE_LIST,
    )),
  );
}