Nodes
Nodes are the main content type in Drupal. It's the most common entity that we use in Drupal.
Get Current Node information
Get current Node information on preview page
Get info of a specific Node - NODE::load()
Query Nodes
There are two methods that I use to query nodes, the first one is the EntityQuery
and the second one is the EntityTypeManager
. These two are almost exactly the same, if you were to look at the code, you would see that they are using the same methods. The only difference is that the EntityTypeManager
is a bit more flexible and it's easier to use.
Get info of a specific Nodes - EntityQuery
Get info of a specific Nodes - EntityTypeManager
Reference
For more information about the Node class, check the Node Methods
Last updated