public function NodeTermData::buildOptionsForm in Views (for Drupal 7) 8.3
Default options form that provides the label widget that all fields should have.
Overrides RelationshipPluginBase::buildOptionsForm
File
- lib/
Views/ taxonomy/ Plugin/ views/ relationship/ NodeTermData.php, line 46 - Definition of Views\taxonomy\Plugin\views\relationship\NodeTermData.
Class
- NodeTermData
- Relationship handler to return the taxonomy terms of nodes.
Namespace
Views\taxonomy\Plugin\views\relationshipCode
public function buildOptionsForm(&$form, &$form_state) {
$vocabularies = taxonomy_vocabulary_get_names();
$options = array();
foreach ($vocabularies as $voc) {
$options[$voc->machine_name] = check_plain($voc->name);
}
$form['vocabularies'] = array(
'#type' => 'checkboxes',
'#title' => t('Vocabularies'),
'#options' => $options,
'#default_value' => $this->options['vocabularies'],
'#description' => t('Choose which vocabularies you wish to relate. Remember that every term found will create a new record, so this relationship is best used on just one vocabulary that has only one term per node.'),
);
parent::buildOptionsForm($form, $form_state);
}