function PathAliasDeleteByAlias::doExecute

Delete an existing alias.

Parameters

string $alias: Alias to be deleted.

File

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

Class

PathAliasDeleteByAlias
Provides a 'Delete any path alias' action.

Namespace

Drupal\rules\Plugin\RulesAction

Code

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