public function FileStorage::write

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

Throws

Symfony\Component\Yaml\Exception\DumpException

Drupal\Core\Config\StorageException

Overrides StorageInterface::write

1 method overrides FileStorage::write()
InstallStorage::write in drupal/core/lib/Drupal/Core/Config/InstallStorage.php
Overrides Drupal\Core\Config\FileStorage::write().

File

drupal/core/lib/Drupal/Core/Config/FileStorage.php, line 98
Definition of Drupal\Core\Config\FileStorage.

Class

FileStorage
Defines the file storage controller.

Namespace

Drupal\Core\Config

Code

public function write($name, array $data) {
  $data = $this
    ->encode($data);
  $status = @file_put_contents($this
    ->getFilePath($name), $data);
  if ($status === FALSE) {
    throw new StorageException('Failed to write configuration file: ' . $this
      ->getFilePath($name));
  }
  return TRUE;
}