Skip to main content

Main navigation

Menu

Close
  • Home
  • Modules
  • System
  • Theming
  • Search blog
  • Contact
Menu

Why to use Entity Manager instead of plain Node::load when loading nodes and entities

Tue, 09/25/2018

Some explanation why it is better to use

$node = \Drupal::entityManager()->getStorage('node')->load($nid);

than

$node = Node::load($nid);

https://www.drupal.org/project/drupal/issues/2945539

Drupal 8
Modules

Finding The Way Home @ 2011 - 2020

Powered by Drupal