PlaceholderGeneratorInterface::createPlaceholder

public PlaceholderGeneratorInterface::createPlaceholder(array $element) Turns the given element into a placeholder. Placeholdering allows us to avoid "poor cacheability contamination": this maps the current render array to one that only has #markup and #attached, and #attached contains a placeholder with this element's prior cacheability metadata. In other words: this placeholder is perfectly cacheable, the placeholder replacement logic effectively cordons off poor cacheability. Parameters arr

PlaceholderGeneratorInterface::canCreatePlaceholder

public PlaceholderGeneratorInterface::canCreatePlaceholder(array $element) Analyzes whether the given render array can be placeholdered. Parameters array $element: A render array. Its #lazy_builder and #create_placeholder properties are analyzed. Return value bool File core/lib/Drupal/Core/Render/PlaceholderGeneratorInterface.php, line 28 Class PlaceholderGeneratorInterface Defines an interface for turning a render array into a placeholder. Namespace Drupal\Core\Render Code public fu

PlaceholderGeneratorInterface

Defines an interface for turning a render array into a placeholder. This encapsulates logic related to generating placeholders. Makes it possible to determine whether a render array can be placeholdered (it can be reconstructed independently of the request context), whether a render array should be placeholdered (its cacheability meets the conditions), and to create a placeholder. Hierarchy interface \Drupal\Core\Render\PlaceholderGeneratorInterface See also \Drupal\Core\Render\RendererInte

PlaceholderGenerator::__construct

public PlaceholderGenerator::__construct(array $renderer_config) Constructs a new Placeholder service. Parameters array $renderer_config: The renderer configuration array. File core/lib/Drupal/Core/Render/PlaceholderGenerator.php, line 27 Class PlaceholderGenerator Turns a render array into a placeholder. Namespace Drupal\Core\Render Code public function __construct(array $renderer_config) { $this->rendererConfig = $renderer_config; }

PlaceholderGenerator::shouldAutomaticallyPlaceholder

public PlaceholderGenerator::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 ana

PlaceholderGenerator::createPlaceholder

public PlaceholderGenerator::createPlaceholder(array $element) Turns the given element into a placeholder. Placeholdering allows us to avoid "poor cacheability contamination": this maps the current render array to one that only has #markup and #attached, and #attached contains a placeholder with this element's prior cacheability metadata. In other words: this placeholder is perfectly cacheable, the placeholder replacement logic effectively cordons off poor cacheability. Parameters array $eleme

PlaceholderGenerator::canCreatePlaceholder

public PlaceholderGenerator::canCreatePlaceholder(array $element) Analyzes whether the given render array can be placeholdered. Parameters array $element: A render array. Its #lazy_builder and #create_placeholder properties are analyzed. Return value bool Overrides PlaceholderGeneratorInterface::canCreatePlaceholder File core/lib/Drupal/Core/Render/PlaceholderGenerator.php, line 34 Class PlaceholderGenerator Turns a render array into a placeholder. Namespace Drupal\Core\Render Code p

PlaceholderGenerator::$rendererConfig

The renderer configuration array. Type: array File core/lib/Drupal/Core/Render/PlaceholderGenerator.php, line 19 Class PlaceholderGenerator Turns a render array into a placeholder. Namespace Drupal\Core\Render Code protected $rendererConfig;

PlaceholderGenerator

Turns a render array into a placeholder. Hierarchy class \Drupal\Core\Render\PlaceholderGenerator implements PlaceholderGeneratorInterface File core/lib/Drupal/Core/Render/PlaceholderGenerator.php, line 12 Namespace Drupal\Core\Render Members Name Modifiers Type Description PlaceholderGenerator::$rendererConfig protected property The renderer configuration array. PlaceholderGenerator::canCreatePlaceholder public function Analyzes whether the given render array ca

PhpTransliteration::__construct

public PhpTransliteration::__construct($data_directory = NULL, ModuleHandlerInterface $module_handler) Constructs a PhpTransliteration object. Parameters string $data_directory: (optional) The directory where data files reside. If omitted, defaults to subdirectory 'data' underneath the directory where the class's PHP file resides. \Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to execute the transliteration_overrides alter hook. Overrides PhpTransliteration::