/**
  * Root_nodes.
  *
  * @return string
  *   Return Hello string.
  */
 public function root_nodes()
 {
     $storage = $this->entity_manager->getStorage('node');
     $nids = $storage->getQuery()->condition('type', 'article')->condition('status', 1)->range(0, 2)->execute();
     $nodes = $storage->loadMultiple($nids);
     $render_controller = $this->entity_manager->getViewBuilder('node');
     $view = $render_controller->viewMultiple($nodes, 'root_node');
     return ['#theme' => 'root_nodes', '#nodes' => $view];
 }
 /**
  * Gets the 'entity.manager' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return \Drupal\Core\Entity\EntityManager A Drupal\Core\Entity\EntityManager instance.
  */
 protected function getEntity_ManagerService()
 {
     $this->services['entity.manager'] = $instance = new \Drupal\Core\Entity\EntityManager($this->get('container.namespaces'), $this->get('module_handler'), $this->get('cache.discovery'), $this->get('language_manager'), $this->get('string_translation'), $this->get('class_resolver'), $this->get('typed_data_manager'), $this->get('keyvalue'), $this->get('event_dispatcher'));
     $instance->setContainer($this);
     $instance->_serviceId = 'entity.manager';
     return $instance;
 }