public function FileStorage::delete

Same name in this branch
  1. 9.x drupal/core/lib/Drupal/Component/PhpStorage/FileStorage.php \Drupal\Component\PhpStorage\FileStorage::delete()
  2. 9.x drupal/core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::delete()

Implements Drupal\Core\Config\StorageInterface::delete().

Overrides StorageInterface::delete

1 method overrides FileStorage::delete()
InstallStorage::delete in drupal/core/lib/Drupal/Core/Config/InstallStorage.php
Overrides Drupal\Core\Config\FileStorage::delete().

File

drupal/core/lib/Drupal/Core/Config/FileStorage.php, line 110
Definition of Drupal\Core\Config\FileStorage.

Class

FileStorage
Defines the file storage controller.

Namespace

Drupal\Core\Config

Code

public function delete($name) {
  if (!$this
    ->exists($name)) {
    if (!file_exists($this->directory)) {
      throw new StorageException($this->directory . '/ not found.');
    }
    return FALSE;
  }
  return drupal_unlink($this
    ->getFilePath($name));
}