You are here

class AliasManagerDecorator in Drupal 8

Test alias manager decorator.

Hierarchy

Expanded class hierarchy of AliasManagerDecorator

1 file declares its use of AliasManagerDecorator
DeprecatedServicesTest.php in core/modules/path_alias/tests/src/Kernel/DeprecatedServicesTest.php
1 string reference to 'AliasManagerDecorator'
path_alias_deprecated_test.services.yml in core/modules/path_alias/tests/modules/path_alias_deprecated_test/path_alias_deprecated_test.services.yml
core/modules/path_alias/tests/modules/path_alias_deprecated_test/path_alias_deprecated_test.services.yml
1 service uses AliasManagerDecorator
path_alias_deprecated_test.path.alias_manager in core/modules/path_alias/tests/modules/path_alias_deprecated_test/path_alias_deprecated_test.services.yml
Drupal\path_alias_deprecated_test\AliasManagerDecorator

File

core/modules/path_alias/tests/modules/path_alias_deprecated_test/src/AliasManagerDecorator.php, line 10

Namespace

Drupal\path_alias_deprecated_test
View source
class AliasManagerDecorator implements AliasManagerInterface {

  /**
   * The decorated alias manager.
   *
   * @var \Drupal\Core\Path\AliasManagerInterface
   */
  protected $aliasManager;

  /**
   * AliasManagerDecorator constructor.
   *
   * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
   *   The decorated alias manager.
   */
  public function __construct(AliasManagerInterface $alias_manager) {
    $this->aliasManager = $alias_manager;
  }

  /**
   * {@inheritdoc}
   */
  public function getPathByAlias($alias, $langcode = NULL) {
    $this->aliasManager
      ->getPathByAlias($alias, $langcode);
  }

  /**
   * {@inheritdoc}
   */
  public function getAliasByPath($path, $langcode = NULL) {
    return $this->aliasManager
      ->getAliasByPath($path, $langcode);
  }

  /**
   * {@inheritdoc}
   */
  public function cacheClear($source = NULL) {
    $this->aliasManager
      ->cacheClear($source);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AliasManagerDecorator::$aliasManager protected property The decorated alias manager.
AliasManagerDecorator::cacheClear public function Clear internal caches in alias manager. Overrides AliasManagerInterface::cacheClear
AliasManagerDecorator::getAliasByPath public function Given a path, return the alias. Overrides AliasManagerInterface::getAliasByPath
AliasManagerDecorator::getPathByAlias public function Given the alias, return the path it represents. Overrides AliasManagerInterface::getPathByAlias
AliasManagerDecorator::__construct public function AliasManagerDecorator constructor.