function FormBuilder::renderPlaceholderFormAction

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Form/FormBuilder.php \Drupal\Core\Form\FormBuilder::renderPlaceholderFormAction()
  2. 8.9.x core/lib/Drupal/Core/Form/FormBuilder.php \Drupal\Core\Form\FormBuilder::renderPlaceholderFormAction()
  3. 10 core/lib/Drupal/Core/Form/FormBuilder.php \Drupal\Core\Form\FormBuilder::renderPlaceholderFormAction()

Renders a form action URL. It's a #lazy_builder callback.

Return value

array A renderable array representing the form action.

File

core/lib/Drupal/Core/Form/FormBuilder.php, line 647

Class

FormBuilder
Provides form building and processing.

Namespace

Drupal\Core\Form

Code

public function renderPlaceholderFormAction() {
    return [
        '#type' => 'markup',
        '#markup' => $this->buildFormAction(),
        '#cache' => [
            'contexts' => [
                'url.path',
                'url.query_args',
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.