public function Taxonomy::buildOptionsForm in Views (for Drupal 7) 8.3
Provide link to taxonomy option
Overrides FieldPluginBase::buildOptionsForm
File
- lib/
Views/ taxonomy/ Plugin/ views/ field/ Taxonomy.php, line 56 - Definition of Views\taxonomy\Plugin\views\field\Taxonomy.
Class
- Taxonomy
- Field handler to provide simple renderer that allows linking to a taxonomy term.
Namespace
Views\taxonomy\Plugin\views\fieldCode
public function buildOptionsForm(&$form, &$form_state) {
$form['link_to_taxonomy'] = array(
'#title' => t('Link this field to its taxonomy term page'),
'#description' => t("Enable to override this field's links."),
'#type' => 'checkbox',
'#default_value' => !empty($this->options['link_to_taxonomy']),
);
$form['convert_spaces'] = array(
'#title' => t('Convert spaces in term names to hyphens'),
'#description' => t('This allows links to work with Views taxonomy term arguments.'),
'#type' => 'checkbox',
'#default_value' => !empty($this->options['convert_spaces']),
);
parent::buildOptionsForm($form, $form_state);
}