You are here

public function PathAlias::getAlias in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/path_alias/src/Entity/PathAlias.php \Drupal\path_alias\Entity\PathAlias::getAlias()
  2. 10 core/modules/path_alias/src/Entity/PathAlias.php \Drupal\path_alias\Entity\PathAlias::getAlias()

Gets the alias for this path.

Return value

string The alias for this path.

Overrides PathAliasInterface::getAlias

2 calls to PathAlias::getAlias()
PathAlias::label in core/modules/path_alias/src/Entity/PathAlias.php
Gets the label of the entity.
PathAlias::preSave in core/modules/path_alias/src/Entity/PathAlias.php
Acts on an entity before the presave hook is invoked.

File

core/modules/path_alias/src/Entity/PathAlias.php, line 146

Class

PathAlias
Defines the path_alias entity class.

Namespace

Drupal\path_alias\Entity

Code

public function getAlias() {
  return $this
    ->get('alias')->value;
}