Issue #2176963 by slashrsm: Add AliasWhitelistInterface.
parent
098289167d
commit
ae97f9afd8
|
@ -44,7 +44,7 @@ class AliasManager implements AliasManagerInterface {
|
|||
/**
|
||||
* Holds the array of whitelisted path aliases.
|
||||
*
|
||||
* @var \Drupal\Core\Utility\PathAliasWhitelist;
|
||||
* @var \Drupal\Core\Path\AliasWhitelistInterface
|
||||
*/
|
||||
protected $whitelist;
|
||||
|
||||
|
@ -77,12 +77,12 @@ class AliasManager implements AliasManagerInterface {
|
|||
*
|
||||
* @param \Drupal\Core\Database\Connection $connection
|
||||
* The database connection to use.
|
||||
* @param \Drupal\Core\Path\AliasWhitelist $whitelist
|
||||
* @param \Drupal\Core\Path\AliasWhitelistInterface $whitelist
|
||||
* The whitelist implementation to use.
|
||||
* @param \Drupal\Core\Language\LanguageManager $language_manager
|
||||
* The language manager.
|
||||
*/
|
||||
public function __construct(Connection $connection, AliasWhitelist $whitelist, LanguageManager $language_manager) {
|
||||
public function __construct(Connection $connection, AliasWhitelistInterface $whitelist, LanguageManager $language_manager) {
|
||||
$this->connection = $connection;
|
||||
$this->languageManager = $language_manager;
|
||||
$this->whitelist = $whitelist;
|
||||
|
|
|
@ -10,15 +10,13 @@ namespace Drupal\Core\Path;
|
|||
use Drupal\Core\Cache\CacheBackendInterface;
|
||||
use Drupal\Core\Cache\CacheCollector;
|
||||
use Drupal\Core\Database\Connection;
|
||||
use Drupal\Core\DestructableInterface;
|
||||
use Drupal\Core\KeyValueStore\StateInterface;
|
||||
use Drupal\Core\Lock\LockBackendInterface;
|
||||
use Drupal\Core\Utility\CacheArray;
|
||||
|
||||
/**
|
||||
* Extends CacheArray to build the path alias whitelist over time.
|
||||
*/
|
||||
class AliasWhitelist extends CacheCollector {
|
||||
class AliasWhitelist extends CacheCollector implements AliasWhitelistInterface {
|
||||
|
||||
/**
|
||||
* The Key/Value Store to use for state.
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Path\AliasWhitelistInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Path;
|
||||
|
||||
use Drupal\Core\Cache\CacheCollectorInterface;
|
||||
|
||||
interface AliasWhitelistInterface extends CacheCollectorInterface {}
|
Loading…
Reference in New Issue