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 170
Class
- FileStorage
- Defines the file storage.
Namespace
Drupal\Core\Config
Code
1 2 3 4 5 6 7 8 9 10 11 | public function delete ( $name ) { if (! $this ->exists( $name )) { $dir = $this ->getCollectionDirectory(); if (! file_exists ( $dir )) { throw new StorageException( $dir . '/ not found.' ); } return FALSE; } $this ->fileCache-> delete ( $this ->getFilePath( $name )); return drupal_unlink( $this ->getFilePath( $name )); } |
Please login to continue.