You are here

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

Provide link to category option

Overrides FieldPluginBase::buildOptionsForm

File

lib/Views/aggregator/Plugin/views/field/Category.php, line 45
Definition of Views\aggregator\Plugin\views\field\Category.

Class

Category
Field handler to provide simple renderer that allows linking to aggregator category.

Namespace

Views\aggregator\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  $form['link_to_category'] = array(
    '#title' => t('Link this field to its aggregator category page'),
    '#description' => t('This will override any other link you have set.'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_to_category']),
  );
  parent::buildOptionsForm($form, $form_state);
}