diff --git a/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php index 2a7a317..fe14f29 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php @@ -93,7 +93,12 @@ public function getRouteProviders($entity_type); public function hasHandler($entity_type, $handler_type); /** - * Creates a new handler instance for a entity type and handler type. + * Entity handlers are instantiated once per entity type and then cached + * in the entity type manager, and so subsequent calls to getHandler() for + * a particular entity type and handler type will return the same object. + * This means that properties on a handler may be used as a static cache, + * although care must be taken with any data that is specific to a + * particular entity. * * @param string $entity_type * The entity type for this handler. diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index 4bbffc3..04fbd05 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -320,9 +320,10 @@ protected function doRender(&$elements, $is_root_call = FALSE) { '#lazy_builder', '#cache', '#create_placeholder', - // These keys are not actually supported, but they are added automatically - // by the Renderer, so we don't crash on them; them being missing when - // their #lazy_builder callback is invoked won't surprise the developer. + // These keys are not actually supported, but they are added + // automatically by the Renderer.If they are missing when their + // #lazy_builder callback is invoked, it won't surprise the + // developer. '#weight', '#printed' ];