public function 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\ConfigCode
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(); }
© 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!DatabaseStorage.php/function/DatabaseStorage::rename/8.1.x