New answers tagged taxonomy-terms
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 ...
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_entity_presave/9.4....
- 2,032
1
vote
Accepted
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
Related Tags
taxonomy-terms × 3619views × 1302
7 × 1119
8 × 430
nodes × 411
entities × 348
theming × 225
users × 158
6 × 111
i18n-l10n × 93
search × 90
path-aliases × 90
forms × 89
routes × 84
commerce × 71
rules × 64
blocks × 60
database × 58
ajax × 58
migrations × 54
uri × 53
panels × 49
hooks × 44
9 × 38
media × 37