Issue #3348323: Entity Reference Purger is not workflow aware
Open
requested to merge issue/entity_reference_purger-3348323:3348323-entity-reference-purger into 1.0.x
1 unresolved thread
Merge request reports
Activity
Filter activity
added 1 commit
- c81aca8d - 3348323: Consolidate the functionlity to remove revisions on a field.
- src/ProcessEntityReferenceItems.php 0 → 100644
86 $entity->save(); 87 } 88 } 89 90 /** 91 * Remove all the reference item from the field. 92 * 93 * @param \Drupal\Core\Entity\ContentEntityInterface $entity 94 * The entity interface that contains the term reference. 95 * @param string $field_name 96 * The reference entity field name. 97 * @param \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem $field_item 98 * The entity reference item. 99 */ 100 protected function removeItemRevisions(ContentEntityInterface $entity, string $field_name, EntityReferenceItem $field_item): void { 101 $terms = $entity->get($field_name)->getValue(); The field should not be called $term.
$field_value = .. foreach ($field_value as $delta => $field_item) { ...
Edited by Bálint Csuthy
Please register or sign in to reply