You are here

public function FormBuilder::renderPlaceholderFormAction in Drupal 8

Same name and namespace 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()

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',
      ],
    ],
  ];
}