New answers tagged

2 votes

Auto assign term to node from term field from user

Can easily create a custom module with the following use hook_entity_presave ...
  • 2,032
1 vote

Get taxonomy and check if published?

TermStorage::loadTree() is just a fancy way to load term entities. The first mode is a "quick mode" that skims data from taxonomy_term_data. The second mode is just a regular loadMultiple() ...
  • 1,382
0 votes

How to access referenced entities programmatically

You can use the get() method of the field object to retrieve the referenced entities as fully loaded objects instead of just their IDs. Here's an example: $node = \Drupal\node\Entity\Node::load($nid); ...

Top 50 recent answers are included