Loading src/Entity/EntitySynchronization.php +16 −0 Original line number Diff line number Diff line Loading @@ -134,10 +134,26 @@ class EntitySynchronization { $this->setEnabled(TRUE); } /** * Registers an entity for synchronization. * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity to register. * @param \Drupal\parameters\Entity\ParametersCollectionInterface $collection * The collection that holds the configuration of the given entity. */ public function register(EntityInterface $entity, ParametersCollectionInterface $collection): void { $this->state->set($this->getStateKey($entity), $collection->id()); } /** * Un-registers an entity from synchronization. * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity to register. * @param \Drupal\parameters\Entity\ParametersCollectionInterface $collection * The collection that holds (or held) the config of the given entity. */ public function unregister(EntityInterface $entity, ParametersCollectionInterface $collection): void { $this->state->delete($this->getStateKey($entity)); } Loading Loading
src/Entity/EntitySynchronization.php +16 −0 Original line number Diff line number Diff line Loading @@ -134,10 +134,26 @@ class EntitySynchronization { $this->setEnabled(TRUE); } /** * Registers an entity for synchronization. * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity to register. * @param \Drupal\parameters\Entity\ParametersCollectionInterface $collection * The collection that holds the configuration of the given entity. */ public function register(EntityInterface $entity, ParametersCollectionInterface $collection): void { $this->state->set($this->getStateKey($entity), $collection->id()); } /** * Un-registers an entity from synchronization. * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity to register. * @param \Drupal\parameters\Entity\ParametersCollectionInterface $collection * The collection that holds (or held) the config of the given entity. */ public function unregister(EntityInterface $entity, ParametersCollectionInterface $collection): void { $this->state->delete($this->getStateKey($entity)); } Loading