public PlaceholderGeneratorInterface::shouldAutomaticallyPlaceholder(array $element)
Whether the given render array should be automatically placeholdered.
The render array should be placeholdered if its cacheability either has a cache context with too high cardinality, a cache tag with a too high invalidation rate, or a max-age that is too low. Either of these would make caching ineffective, and thus we choose to placeholder instead.
Parameters
array $element: The render array whose cacheability to analyze.
Return value
bool Whether the given render array's cacheability meets the placeholdering conditions.
File
- core/lib/Drupal/Core/Render/PlaceholderGeneratorInterface.php, line 45
Class
- PlaceholderGeneratorInterface
- Defines an interface for turning a render array into a placeholder.
Namespace
Drupal\Core\Render
Code
public function shouldAutomaticallyPlaceholder(array $element);
Please login to continue.