You are here

public function PathAlias::setPath in Drupal 10

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

Sets the source path of the alias.

Parameters

string $path: The source path.

Return value

$this

Overrides PathAliasInterface::setPath

File

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

Class

PathAlias
Defines the path_alias entity class.

Namespace

Drupal\path_alias\Entity

Code

public function setPath($path) {
  $this
    ->set('path', $path);
  return $this;
}