diff --git a/core/modules/system/core.api.php b/core/modules/system/core.api.php index 135cd4a..bbf31bc 100644 --- a/core/modules/system/core.api.php +++ b/core/modules/system/core.api.php @@ -418,17 +418,17 @@ * $files = $storage->loadMultiple($fids); * @endcode * - * To render or view a content entity, use the entity view manager, which is an - * object implementing \Drupal\Core\Entity\EntityViewBuilderInteface that - * you can retrive with: + * The normal way of viewing entities is by using a route, as described in the + * sections above. If for some reason you need to render an entity in code in a + * particular view mode, you can use an entity view builder, which is an object + * implementing \Drupal\Core\Entity\EntityViewBuilderInterface that you can + * retrieve with: * @code * $view_builder = \Drupal::entityManager()->getViewBuilder('your_entity_type'); * // Or if you have a $container variable: * $view_builder = $container->get('entity.manager')->getViewBuilder('your_entity_type'); * @endcode - * - * Once you have a loaded entity and a viewer, if for some reason you need to - * render an entity in code in a particular view mode, you can call: + * Then, to build and render the entity: * @code * // You can omit the language ID if the default language is being used. * $build = $view_builder->view($entity, 'view_mode_name', $language->id); @@ -436,9 +436,6 @@ * $rendered = drupal_render($build); * @endcode * - * The more normal way of viewing entities is by using a route, and a view - * builder, as described in the sections above. - * * @section sec_access Access checking on entities * Entity types define their access permission scheme in their annotation. * Access permissions can be quite complex, so you should not assume any @@ -465,7 +462,6 @@ * developers can interact with. This is described in the * @link node_access Node access topic. @endlink * - * If you are overriding * @see i18n * @see entity_crud * @}