1.20.x config_database_storage.inc public ConfigDatabaseStorage::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

drivers/config_database/config_database_storage.inc, line 233

Class

ConfigDatabaseStorage
Defines the database storage controller.

Code

public function delete($name) {
  if (!$this->exists($name)) {
    return FALSE;
  }
  db_delete($this->table, array('target' => $this->database))
    ->condition('name', $name)
    ->execute();
  return TRUE;
}