diff --git a/core/lib/Drupal/Core/CacheDecorator/AliasManagerCacheDecorator.php b/core/lib/Drupal/Core/CacheDecorator/AliasManagerCacheDecorator.php index 42a9cfd..56b9fdc 100644 --- a/core/lib/Drupal/Core/CacheDecorator/AliasManagerCacheDecorator.php +++ b/core/lib/Drupal/Core/CacheDecorator/AliasManagerCacheDecorator.php @@ -129,10 +129,7 @@ public function cacheClear() { } /** - * Registers the methods in this class that should be listeners. - * - * @return array - * An array of event listener definitions. + * {@inheritdoc} */ static function getSubscribedEvents() { $events[PathEvents::UPDATE][] = array('cacheClear'); diff --git a/core/lib/Drupal/Core/Path/Path.php b/core/lib/Drupal/Core/Path/Path.php index 1b03239..f381e82 100644 --- a/core/lib/Drupal/Core/Path/Path.php +++ b/core/lib/Drupal/Core/Path/Path.php @@ -9,7 +9,7 @@ use Drupal\Core\Database\Connection; use Drupal\Core\Language\Language; -use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Defines a class for CRUD operations on path aliases. @@ -26,9 +26,9 @@ class Path { /** * An event dispatcher instance to use for configuration events. * - * @var \Symfony\Component\EventDispatcher\EventDispatcher + * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ - protected $event_dispatcher; + protected $eventDispatcher; /** * Constructs a Path CRUD object. @@ -36,12 +36,12 @@ class Path { * @param \Drupal\Core\Database\Connection $connection * A database connection for reading and writing path aliases. * - * @param \Symfony\Component\EventDispatcher\EventDispatcher $event_dispatcher + * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher * An event dispatcher instance to use for configuration events. */ - public function __construct(Connection $connection, EventDispatcher $event_dispatcher) { + public function __construct(Connection $connection, EventDispatcherInterface $event_dispatcher) { $this->connection = $connection; - $this->event_dispatcher = $event_dispatcher; + $this->eventDispatcher = $event_dispatcher; } /** @@ -93,7 +93,7 @@ public function save($source, $alias, $langcode = Language::LANGCODE_NOT_SPECIFI } if ($pid) { $event = $operation == 'update' ? PathEvents::UPDATE : PathEvents::INSERT; - $this->event_dispatcher->dispatch($event, new PathInsertUpdateEvent($fields)); + $this->eventDispatcher->dispatch($event, new PathInsertUpdateEvent($fields)); return $fields; } return FALSE; @@ -137,7 +137,7 @@ public function delete($conditions) { $query->condition($field, $value); } $deleted = $query->execute(); - $this->event_dispatcher->dispatch(PathEvents::DELETE, new PathDeleteEvent($path)); + $this->eventDispatcher->dispatch(PathEvents::DELETE, new PathDeleteEvent($path)); return $deleted; } }