function PathAlias::setAlias

Sets the alias for this path.

Parameters

string $alias: The path alias.

Return value

$this

Overrides PathAliasInterface::setAlias

1 call to PathAlias::setAlias()
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 153

Class

PathAlias
Defines the path_alias entity class.

Namespace

Drupal\path_alias\Entity

Code

public function setAlias($alias) {
  $this->set('alias', $alias);
  return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.