public function PlaceholderGenerator::canCreatePlaceholder in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Render/PlaceholderGenerator.php \Drupal\Core\Render\PlaceholderGenerator::canCreatePlaceholder()
- 9 core/lib/Drupal/Core/Render/PlaceholderGenerator.php \Drupal\Core\Render\PlaceholderGenerator::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);
}