You are here

function views_plugin_style_fixed_grid::options_form in Views Fixed Grid 7

Same name and namespace in other branches
  1. 6 views_plugin_style_fixed_grid.inc \views_plugin_style_fixed_grid::options_form()

Provide a form for setting options.

_state

Parameters

array $form:

Overrides views_plugin_style_grid::options_form

File

./views_plugin_style_fixed_grid.inc, line 42
views_plugin_style_fixed_grid.inc Implementation of views_plugin_style

Class

views_plugin_style_fixed_grid
@file views_plugin_style_fixed_grid.inc Implementation of views_plugin_style

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  unset($form['fill_single_line']);
  $form['rows'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of rows'),
    '#description' => t('Select the number of rows.'),
    '#default_value' => $this->options['rows'],
    '#required' => TRUE,
    '#weight' => -1,
  );
  $form['columns']['#required'] = TRUE;
  $form['columns']['#weight'] = -1;
  $form['maxitems'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum numbers of items'),
    '#description' => t('If you want to always have some empty space select the maximum number of items. Leave it empty to not to have a maximum.'),
    '#default_value' => $this->options['maxitems'],
  );
  $form['alignment']['#options']['random'] = t('Scattered');
  $form['alignment']['#description'] .= t(' Scattered alignment will place items horizontally leaving random empty cells.');
}