function UserLoginBlock::renderPlaceholderFormAction
Same name in other branches
- 9 core/modules/user/src/Plugin/Block/UserLoginBlock.php \Drupal\user\Plugin\Block\UserLoginBlock::renderPlaceholderFormAction()
- 8.9.x core/modules/user/src/Plugin/Block/UserLoginBlock.php \Drupal\user\Plugin\Block\UserLoginBlock::renderPlaceholderFormAction()
- 10 core/modules/user/src/Plugin/Block/UserLoginBlock.php \Drupal\user\Plugin\Block\UserLoginBlock::renderPlaceholderFormAction()
#lazy_builder callback; renders a form action URL including destination.
Return value
array A renderable array representing the form action.
See also
\Drupal\Core\Form\FormBuilder::renderPlaceholderFormAction()
File
-
core/
modules/ user/ src/ Plugin/ Block/ UserLoginBlock.php, line 162
Class
- UserLoginBlock
- Provides a 'User login' block.
Namespace
Drupal\user\Plugin\BlockCode
public static function renderPlaceholderFormAction() {
return [
'#type' => 'markup',
'#markup' => UrlHelper::filterBadProtocol(Url::fromRoute('<current>', [], [
'query' => \Drupal::destination()->getAsArray(),
'external' => FALSE,
])
->toString()),
'#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.