You are here

public function ConfigActionsFile::doSave in Config Actions 8

Save data to the source.

Parameters

array $data:

Return value

bool TRUE if the data was saved.

Overrides ConfigActionsSourceBase::doSave

File

src/Plugin/ConfigActionsSource/ConfigActionsFile.php, line 123

Class

ConfigActionsFile
Plugin for config source from files.

Namespace

Drupal\config_actions\Plugin\ConfigActionsSource

Code

public function doSave($data) {
  list($filepath, $filename) = $this
    ->filePath($this->sourceId, $this->sourceBase);
  $template_storage = new FileStorage($filepath, StorageInterface::DEFAULT_COLLECTION);
  return $template_storage
    ->write($filename, $data);
}