DatabaseStorage::rename

public DatabaseStorage::rename($name, $new_name)

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

Throws

PDOException

Overrides StorageInterface::rename

File

core/lib/Drupal/Core/Config/DatabaseStorage.php, line 235

Class

DatabaseStorage
Defines the Database storage.

Namespace

Drupal\Core\Config

Code

public function rename($name, $new_name) {
  $options = array('return' => Database::RETURN_AFFECTED) + $this->options;
  return (bool) $this->connection->update($this->table, $options)
    ->fields(array('name' => $new_name))
    ->condition('name', $name)
    ->condition('collection', $this->collection)
    ->execute();
}
doc_Drupal
2016-10-29 08:59:57
Comments
Leave a Comment

Please login to continue.