You are here

protected function PathAliasDeleteByPath::doExecute in Rules 8.3

Delete existing aliases for a given path.

Parameters

string $path: Existing system path.

File

src/Plugin/RulesAction/PathAliasDeleteByPath.php, line 72

Class

PathAliasDeleteByPath
Provides a 'Delete alias for a path' action.

Namespace

Drupal\rules\Plugin\RulesAction

Code

protected function doExecute($path) {
  $aliases = $this->aliasStorage
    ->loadByProperties([
    'path' => $path,
  ]);
  $this->aliasStorage
    ->delete($aliases);
}