public function SchemaTrueFalseBase::form in Schema.org Metatag 8
Generate a form element for this meta tag.
Parameters
array $element: The existing form element to attach to.
Return value
array The completed form element.
Overrides MetaNameBase::form
File
- src/
Plugin/ metatag/ Tag/ SchemaTrueFalseBase.php, line 13
Class
- SchemaTrueFalseBase
- Provides a plugin for the 'isAccessibleForFree' meta tag.
Namespace
Drupal\schema_metatag\Plugin\metatag\TagCode
public function form(array $element = []) {
$form = parent::form($element);
$form['#type'] = 'select';
$form['#empty_option'] = $this
->t('- None -');
$form['#empty_value'] = '';
$form['#options'] = [
'False' => $this
->t('False'),
'True' => $this
->t('True'),
];
return $form;
}