diff -u b/render_example/src/Controller/RenderExampleController.php b/render_example/src/Controller/RenderExampleController.php --- b/render_example/src/Controller/RenderExampleController.php +++ b/render_example/src/Controller/RenderExampleController.php @@ -66,7 +66,7 @@ // CSS and JavaScript libraries can be attached to elements in a renderable // array. This way, if the element ends up being rendered and displayed you - // know for sure the CSS/JavaScript will also be included. But, if the for + // know for sure the CSS/JavaScript will also be included. But, if for // some reason the element isn't ever rendered then Drupal can skip the // unnecessary extra files. // @@ -293,7 +293,7 @@ // in addition to functions. See // \Drupal\render_example\Controller\RenderExampleController::preRender() // @todo: This doesn't work, we need to fix it. - // $build['#pre_render'] = [static::class . '::preRender']; + // $build['#pre_render'] = [static::class, 'preRender']; // Caching is an important part of the Render API, converting an array to a // string of HTML can be an expensive process, and therefore whenever