public function MetatagCustomCreateForm::buildForm in Metatag Routes 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- src/
Form/ MetatagCustomCreateForm.php, line 82
Class
- MetatagCustomCreateForm
- Class MetatagCustomCreateForm.
Namespace
Drupal\metatag_routes\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['metatag_url'] = [
'#type' => 'textfield',
'#title' => $this
->t('Path'),
'#description' => $this
->t('Enter the path for which you want to add the metatags.'),
'#maxlength' => 200,
'#required' => TRUE,
];
$form['route_name'] = [
'#type' => 'hidden',
];
$form['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Submit'),
];
return $form;
}