public function DatabaseStorage::deleteAll

Same name in this branch
  1. 8.x drupal/core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php \Drupal\Core\KeyValueStore\DatabaseStorage::deleteAll()
  2. 8.x drupal/core/lib/Drupal/Core/Config/DatabaseStorage.php \Drupal\Core\Config\DatabaseStorage::deleteAll()

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

Throws

PDOException

Drupal\Core\Database\DatabaseExceptionWrapper Only thrown in case $this->options['throw_exception'] is TRUE.

Overrides StorageInterface::deleteAll

File

drupal/core/lib/Drupal/Core/Config/DatabaseStorage.php, line 170
Definition of Drupal\Core\Config\DatabaseStorage.

Class

DatabaseStorage
Defines the Database storage controller.

Namespace

Drupal\Core\Config

Code

public function deleteAll($prefix = '') {
  $options = array(
    'return' => Database::RETURN_AFFECTED,
  ) + $this->options;
  return (bool) $this->connection
    ->delete($this->table, $options)
    ->condition('name', $prefix . '%', 'LIKE')
    ->execute();
}