On this page
public function FileStorage::delete
public FileStorage::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 StorageInterface::delete
File
- core/lib/Drupal/Core/Config/FileStorage.php, line 147
Class
- FileStorage
- Defines the file storage.
Namespace
Drupal\Core\ConfigCode
public function delete($name) {
if (!$this->exists($name)) {
$dir = $this->getCollectionDirectory();
if (!file_exists($dir)) {
throw new StorageException($dir . '/ not found.');
}
return FALSE;
}
return drupal_unlink($this->getFilePath($name));
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!FileStorage.php/function/FileStorage::delete/8.1.x