public function ReplicatePathFieldSubscriber::onPathClone in Replicate 8
Cleans a path on an entity being replicated.
Parameters
ReplicateEntityFieldEvent $event: The event we're working on.
File
- src/
EventSubscriber/ ReplicatePathFieldSubscriber.php, line 22
Class
- ReplicatePathFieldSubscriber
- Class ReplicatePathFieldSubscriber.
Namespace
Drupal\replicate\EventSubscriberCode
public function onPathClone(ReplicateEntityFieldEvent $event) {
$field_item_list = $event
->getFieldItemList();
foreach ($field_item_list as $field_item) {
$field_item->alias = NULL;
$field_item->pid = NULL;
}
}