diff -u b/src/Event/RelaxedEnsureFullCommitResourceEvent.php b/src/Event/RelaxedEnsureFullCommitResourceEvent.php --- b/src/Event/RelaxedEnsureFullCommitResourceEvent.php +++ b/src/Event/RelaxedEnsureFullCommitResourceEvent.php @@ -8,20 +8,20 @@ /** * Wraps a replication finished event for event listeners. */ -class RelaxedEnsureFullCommitResourceEvent extends Event { +class RelaxedEnsureFullCommitEvent extends Event { /** - * The Workspace the replication is was. + * The target workspace during the replication. * * @var \Drupal\multiversion\Entity\WorkspaceInterface */ protected $workspace; /** - * Constructs a RelaxedEnsureFullCommitResource event object. + * Constructs a RelaxedEnsureFullCommitEvent event object. * * @param \Drupal\multiversion\Entity\WorkspaceInterface $workspace - * The Workspace the replication is was. + * The target workspace during the replication. */ public function __construct(WorkspaceInterface $workspace) { $this->workspace = $workspace; diff -u b/src/Event/RelaxedEvents.php b/src/Event/RelaxedEvents.php --- b/src/Event/RelaxedEvents.php +++ b/src/Event/RelaxedEvents.php @@ -18,7 +18,7 @@ /** - * Event fired when replication handle the post request. + * Event fired when replication handles the Ensure Full Commit request. */ - const REPLICATION_ENSURE_FULL_COMMIT_RESOURCE = 'relaxed.replication_ensure_full_commit_resource'; + const REPLICATION_ENSURE_FULL_COMMIT = 'relaxed.replication_ensure_full_commit'; } diff -u b/src/Plugin/rest/resource/EnsureFullCommitResource.php b/src/Plugin/rest/resource/EnsureFullCommitResource.php --- b/src/Plugin/rest/resource/EnsureFullCommitResource.php +++ b/src/Plugin/rest/resource/EnsureFullCommitResource.php @@ -6,7 +6,7 @@ use Drupal\Core\Cache\Cache; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\multiversion\Entity\WorkspaceInterface; -use Drupal\relaxed\Event\RelaxedEnsureFullCommitResourceEvent; +use Drupal\relaxed\Event\RelaxedEnsureFullCommitEvent; use Drupal\relaxed\Event\RelaxedEvents; use Drupal\rest\ModifiedResourceResponse; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -85,12 +85,11 @@ * The event dispatcher service. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger, ModuleHandlerInterface $module_handler, AssetCollectionOptimizerInterface $css_collection_optimizer, AssetCollectionOptimizerInterface $js_collection_optimizer, EventDispatcherInterface $event_dispatcher) { - $this->eventDispatcher = $event_dispatcher; - parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger); $this->moduleHandler = $module_handler; $this->cssCollectionOptimizer = $css_collection_optimizer; $this->jsCollectionOptimizer = $js_collection_optimizer; + $this->eventDispatcher = $event_dispatcher; } /** @@ -142,7 +141,7 @@ $this->jsCollectionOptimizer->deleteAll(); _drupal_flush_css_js(); - $this->eventDispatcher->dispatch(RelaxedEvents::REPLICATION_ENSURE_FULL_COMMIT_RESOURCE, new RelaxedEnsureFullCommitResourceEvent($workspace)); + $this->eventDispatcher->dispatch(RelaxedEvents::REPLICATION_ENSURE_FULL_COMMIT, new RelaxedEnsureFullCommitEvent($workspace)); return new ModifiedResourceResponse($response_data, 201); }