diff --git a/core/modules/forum/lib/Drupal/forum/ForumManager.php b/core/modules/forum/lib/Drupal/forum/ForumManager.php index 3a8e1f1..991ec29 100644 --- a/core/modules/forum/lib/Drupal/forum/ForumManager.php +++ b/core/modules/forum/lib/Drupal/forum/ForumManager.php @@ -13,7 +13,7 @@ use Drupal\Core\StringTranslation\TranslationInterface; use Drupal\comment\CommentInterface; use Drupal\field\FieldInfo; -use Drupal\history\HistoryManagerInterface; +use Drupal\history\HistoryRepositoryInterface; use Drupal\node\NodeInterface; /** @@ -114,7 +114,7 @@ class ForumManager implements ForumManagerInterface { /** * The history manager service. * - * @var \Drupal\history\HistoryManagerInterface + * @var \Drupal\history\HistoryRepositoryInterface */ protected $historyManager; @@ -131,10 +131,10 @@ class ForumManager implements ForumManagerInterface { * The field info service. * @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager * The translation manager service. - * @param \Drupal\history\HistoryManagerInterface $history_manager + * @param \Drupal\history\HistoryRepositoryInterface $history_manager * The history manager service. */ - public function __construct(ConfigFactory $config_factory, EntityManagerInterface $entity_manager, Connection $connection, FieldInfo $field_info, TranslationInterface $translation_manager, HistoryManagerInterface $history_manager = NULL) { + public function __construct(ConfigFactory $config_factory, EntityManagerInterface $entity_manager, Connection $connection, FieldInfo $field_info, TranslationInterface $translation_manager, HistoryRepositoryInterface $history_manager = NULL) { $this->configFactory = $config_factory; $this->entityManager = $entity_manager; $this->connection = $connection; diff --git a/core/modules/history/history.module b/core/modules/history/history.module index 48e3edc..9ef5c26 100644 --- a/core/modules/history/history.module +++ b/core/modules/history/history.module @@ -43,7 +43,7 @@ function history_help($path, $arg) { * If a node has been previously viewed by the user, the timestamp in seconds * of when the last view occurred; otherwise, zero. * - * @deprecated Use \Drupal\history\HistoryManager::getLastViewed() instead. + * @deprecated Use \Drupal\history\HistoryRepositoryInterface::getLastViewed() instead. */ function history_read($nid) { $history = \Drupal::service('history.manager')->getLastViewed('node', array($nid)); @@ -61,7 +61,7 @@ function history_read($nid) { * by the user, the timestamp in seconds of when the last view occurred; * otherwise, zero. * - * @deprecated Use \Drupal\history\HistoryManager::getLastViewed() instead. + * @deprecated Use \Drupal\history\HistoryRepositoryInterface::getLastViewed() instead. */ function history_read_multiple($nids) { return \Drupal::service('history.manager')->getLastViewed('node', $nids); @@ -76,7 +76,7 @@ function history_read_multiple($nids) { * (optional) The user account to update the history for. Defaults to the * current user. * - * @deprecated Use \Drupal\history\HistoryManager::updateLastViewed() instead. + * @deprecated Use \Drupal\history\HistoryRepositoryInterface::updateLastViewed() instead. */ function history_write($nid, AccountInterface $account = NULL) { \Drupal::service('history.manager')->updateLastViewed('node', $nid, $account); diff --git a/core/modules/history/lib/Drupal/history/Controller/HistoryController.php b/core/modules/history/lib/Drupal/history/Controller/HistoryController.php index 4d10bd5..c059ecc 100644 --- a/core/modules/history/lib/Drupal/history/Controller/HistoryController.php +++ b/core/modules/history/lib/Drupal/history/Controller/HistoryController.php @@ -8,7 +8,7 @@ namespace Drupal\history\Controller; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; -use Drupal\history\HistoryManagerInterface; +use Drupal\history\HistoryRepositoryInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\JsonResponse; @@ -25,17 +25,17 @@ class HistoryController extends ControllerBase implements ContainerInjectionInte /** * The history manager service. * - * @var \Drupal\history\HistoryManagerInterface + * @var \Drupal\history\HistoryRepositoryInterface */ protected $historyManager; /** * Constructs a HistoryController. * - * @param \Drupal\history\HistoryManagerInterface $history_manager + * @param \Drupal\history\HistoryRepositoryInterface $history_manager * The history manager service. */ - public function __construct(HistoryManagerInterface $history_manager) { + public function __construct(HistoryRepositoryInterface $history_manager) { $this->historyManager = $history_manager; } diff --git a/core/modules/history/lib/Drupal/history/HistoryManager.php b/core/modules/history/lib/Drupal/history/HistoryManager.php index 5a0d335..f5147b3 100644 --- a/core/modules/history/lib/Drupal/history/HistoryManager.php +++ b/core/modules/history/lib/Drupal/history/HistoryManager.php @@ -14,7 +14,7 @@ /** * Provides history manager service. */ -class HistoryManager implements HistoryManagerInterface { +class HistoryManager implements HistoryRepositoryInterface { /** * Array of history keyed by entity type and entity id. diff --git a/core/modules/history/lib/Drupal/history/HistoryManagerInterface.php b/core/modules/history/lib/Drupal/history/HistoryRepositoryInterface.php similarity index 90% rename from core/modules/history/lib/Drupal/history/HistoryManagerInterface.php rename to core/modules/history/lib/Drupal/history/HistoryRepositoryInterface.php index a5c21c2..8ab75df 100644 --- a/core/modules/history/lib/Drupal/history/HistoryManagerInterface.php +++ b/core/modules/history/lib/Drupal/history/HistoryRepositoryInterface.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\history\HistoryManagerInterface. + * Contains \Drupal\history\HistoryRepositoryInterface. */ namespace Drupal\history; @@ -11,9 +11,9 @@ use Drupal\Core\Session\AccountInterface; /** - * Provides an interface to manage a last view timestamp of entities. + * Defines an interface to store and retrieve a last view timestamp of entities. */ -interface HistoryManagerInterface { +interface HistoryRepositoryInterface { /** * Retrieves the timestamp for the current user's last view of the entities.