You are here

public function Result::buildOptionsForm in Views (for Drupal 7) 8.3

Default options form that provides the label widget that all fields should have.

Overrides AreaPluginBase::buildOptionsForm

File

lib/Drupal/views/Plugin/views/area/Result.php, line 34
Definition of Drupal\views\Plugin\views\area\Result.

Class

Result
Views area handler to display some configurable result summary.

Namespace

Drupal\views\Plugin\views\area

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $variables = array(
    'items' => array(
      '@start -- the initial record number in the set',
      '@end -- the last record number in the set',
      '@total -- the total records in the set',
      '@name -- the human-readable name of the view',
      '@per_page -- the number of items per page',
      '@current_page -- the current page number',
      '@current_record_count -- the current page record count',
      '@page_count -- the total page count',
    ),
  );
  $list = theme('item_list', $variables);
  $form['content'] = array(
    '#title' => t('Display'),
    '#type' => 'textarea',
    '#rows' => 3,
    '#default_value' => $this->options['content'],
    '#description' => t('You may use HTML code in this field. The following tokens are supported:') . $list,
  );
}