public function FormBuilder::renderPlaceholderFormAction

public FormBuilder::renderPlaceholderFormAction()

#lazy_builder callback; renders a form action URL.

Return value

array A renderable array representing the form action.

File

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

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Form!FormBuilder.php/function/FormBuilder::renderPlaceholderFormAction/8.1.x