public function PageParametersForm::buildForm in Page Manager 8
Same name and namespace in other branches
- 8.4 page_manager_ui/src/Form/PageParametersForm.php \Drupal\page_manager_ui\Form\PageParametersForm::buildForm()
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
- page_manager_ui/
src/ Form/ PageParametersForm.php, line 39 - Contains \Drupal\page_manager_ui\Form\PageParametersForm.
Class
Namespace
Drupal\page_manager_ui\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$cached_values = $form_state
->getTemporaryValue('wizard');
$this->machine_name = $cached_values['id'];
$form['items'] = [
'#type' => 'markup',
'#prefix' => '<div id="available-parameters">',
'#suffix' => '</div>',
'#theme' => 'table',
'#header' => [
$this
->t('Machine name'),
$this
->t('Label'),
$this
->t('Type'),
$this
->t('Operations'),
],
'#rows' => $this
->renderRows($cached_values),
'#empty' => $this
->t('There are no parameters defined for this page.'),
];
return $form;
}