Unverified Commit fce8c262 authored by alexpott's avatar alexpott

Issue #2938972 by runeasgar, MerryHamster, ryanhayes, msankhala, Jo...

Issue #2938972 by runeasgar, MerryHamster, ryanhayes, msankhala, Jo Fitzgerald: Replace drupal_render() in sample code
parent 1eae4dc7
......@@ -608,7 +608,7 @@ function drupal_process_states(&$elements) {
* 'id' => 'my-module-table',
* ),
* );
* return drupal_render($table);
* return \Drupal::service('renderer')->render($table);
* @endcode
*
* In the theme function for the form, a special class must be added to each
......
......@@ -590,7 +590,7 @@
* // rules will be used.
* $build = $view_builder->view($entity, 'view_mode_name', $language->getId());
* // $build is a render array.
* $rendered = drupal_render($build);
* $rendered = \Drupal::service('renderer')->render($build);
* @endcode
*
* @section sec_access Access checking on entities
......
......@@ -201,7 +201,7 @@
* // Finally, build a renderable array from the transformed tree.
* $menu = $menu_tree->build($tree);
*
* $menu_html = drupal_render($menu);
* $menu_html = \Drupal::service('renderer')->render($menu);
* @endcode
*
* @}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment