Skip to content
Snippets Groups Projects

Issue #3463006:fixed entity revision issue.

1 file
+ 7
1
Compare changes
  • Side-by-side
  • Inline
<?php
declare(strict_types = 1);
declare(strict_types=1);
namespace Drupal\linkyreplacer;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Entity\SynchronizableInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -56,6 +57,11 @@ class LinkyReplacerEntityOperations implements ContainerInjectionInterface {
* @see \linkyreplacer_entity_presave()
*/
public function entityPreSave(EntityInterface $entity): void {
if ($entity instanceof SynchronizableInterface && $entity->isSyncing()) {
return;
}
if (!$entity instanceof FieldableEntityInterface) {
return;
}
Loading