Fields

When you have to modify the values of the fields by code, there are several ways to do it. The most typical one: $entity->field_name->value = 'foo' $entity->field_name->target_id = 123 but it is the same as doing: $entity->field_name = 'foo' $entity->field_name = 123 That's a shorter way to write the same...
Oct

Need a Drupal Expert?

Senior Drupal developer, freelance, specialized in what's hardest: migrations, multilingual sites, SaaS platforms and Stripe integration. I leverage AI to cut delivery times and costs, with expert review on every line of code.

No agency, no middlemen. Direct contact with the one who does the work.