function FormBuilder::renderPlaceholderFormAction

Same name in other branches
  1. 9 core/lib/Drupal/Core/Form/FormBuilder.php \Drupal\Core\Form\FormBuilder::renderPlaceholderFormAction()
  2. 10 core/lib/Drupal/Core/Form/FormBuilder.php \Drupal\Core\Form\FormBuilder::renderPlaceholderFormAction()
  3. 11.x 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 651

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.