function PlaceholderGenerator::canCreatePlaceholder
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Render/PlaceholderGenerator.php \Drupal\Core\Render\PlaceholderGenerator::canCreatePlaceholder()
- 10 core/lib/Drupal/Core/Render/PlaceholderGenerator.php \Drupal\Core\Render\PlaceholderGenerator::canCreatePlaceholder()
- 11.x core/lib/Drupal/Core/Render/PlaceholderGenerator.php \Drupal\Core\Render\PlaceholderGenerator::canCreatePlaceholder()
Overrides PlaceholderGeneratorInterface::canCreatePlaceholder
File
-
core/
lib/ Drupal/ Core/ Render/ PlaceholderGenerator.php, line 35
Class
- PlaceholderGenerator
- Turns a render array into a placeholder.
Namespace
Drupal\Core\RenderCode
public function canCreatePlaceholder(array $element) {
// If generated by a #lazy_builder callback, placeholdering is possible.
return isset($element['#lazy_builder']) && (!isset($element['#create_placeholder']) || $element['#create_placeholder'] !== FALSE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.