Skip to content
Snippets Groups Projects

Applies the 4994 MR changes to the drupal 10.0.x.

Open André Bonon requested to merge issue/drupal-2940605:2940605-10.0.x into 10.0.x

Closes #2940605

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
606 // If entity is new and has no ID, generate unique ID from entity object.
607 // This is to prevent false positives, for example when previewing a new
608 // node that is referencing a new node without either node yet being saved.
609 if ($entity->id()) {
610 $entity_id = $entity->id();
611 }
612 else {
613 $entity_id = spl_object_id($entity);
614 }
615 // It seems very unlikely that the same entity displayed in the same view
616 // mode would be recursively nested and meant to be displayed differently,
617 // so a key made up of the entity type ID, entity ID, and view mode should
618 // suffice for recursion detection
619 return $entity->getEntityTypeId()
620 . $entity_id
621 . $build['#view_mode'];
  • Possible suggestion, so the logged message contains e.g: media:123:default, instead of media123default

    Suggested change
    619 return $entity->getEntityTypeId()
    620 . $entity_id
    621 . $build['#view_mode'];
    619 return implode(':', [
    620 $entity->getEntityTypeId(),
    621 $entity_id,
    622 $build['#view_mode'],
    623 ]);
  • Please register or sign in to reply
Please register or sign in to reply
Loading