1 config.inc public ConfigFileStorage::delete($name)

Deletes a configuration object from the storage.

Parameters

string $name: The name of a configuration object to delete.

Return value

bool: TRUE on success, FALSE otherwise.

Overrides ConfigStorageInterface::delete

File

core/includes/config.inc, line 1730
This is the API for configuration storage.

Class

ConfigFileStorage
Defines the file storage controller.

Code

public function delete($name) {
  if (!$this->exists($name)) {
    if (!file_exists($this->directory)) {
      throw new ConfigStorageException($this->directory . '/ not found.');
    }
    return FALSE;
  }
  $file_path = $this->getFilePath($name);
  $status = backdrop_unlink($file_path);
  clearstatcache(FALSE, $file_path);
  return $status;
}