public function SchemaTypeBase::form in Schema.org Metatag 8
Generate a form element for this meta tag.
Overrides MetaNameBase::form
File
- src/
Plugin/ metatag/ Tag/ SchemaTypeBase.php, line 27
Class
- SchemaTypeBase
- Provides a plugin for the 'schema_type_base' meta tag.
Namespace
Drupal\schema_metatag\Plugin\metatag\TagCode
public function form(array $element = []) {
$form = [
'#type' => 'select',
'#title' => $this
->label(),
'#description' => $this
->description(),
'#empty_option' => $this
->t('- None -'),
'#empty_value' => '',
'#options' => $this
->typeOptions(),
'#default_value' => $this
->value(),
];
return $form;
}