You are here

public function YamlForm::deletePaths in YAML Form 8

Update submit and confirm paths associated with this form.

Overrides YamlFormInterface::deletePaths

File

src/Entity/YamlForm.php, line 1238

Class

YamlForm
Defines the form entity.

Namespace

Drupal\yamlform\Entity

Code

public function deletePaths() {

  /** @var \Drupal\Core\Path\AliasStorageInterface $path_alias_storage */
  $path_alias_storage = \Drupal::service('path.alias_storage');
  $path_alias_storage
    ->delete([
    'source' => '/yamlform/' . $this
      ->id(),
  ]);
  $path_alias_storage
    ->delete([
    'source' => '/yamlform/' . $this
      ->id() . '/confirmation',
  ]);
}