customize

You are here

[Drupal] How to Load Node, File, Taxonomy Entities by ID in Drupal 8?

Error message

User error: Failed to connect to memcache server: localhost:11212 in dmemcache_object() (line 415 of /home/freedrup/public_html/demo/d7/sites/all/modules/memcache/dmemcache.inc).

To load a node details using its id in Drupal 8 use the following syntax:

$node_details = Node::load($nid);
$node_details->field_FIELD_NAME->value;

Source: 
http://feeds.zyxware.com/~r/zyxware/~3/2rIkOuGcEoI/drupal-how-can-we-load-node-file-taxonomy-entities-by-id-in-drupal-8