You are here

public function ConfigImporterService::setDirectory in Config Importer and Tools 8

Same name and namespace in other branches
  1. 8.2 src/ConfigImporterService.php \Drupal\config_import\ConfigImporterService::setDirectory()

Set path to directory where configs stored.

Parameters

string $directory: Path to directory with configs or type of config directory.

Overrides ConfigImporterServiceInterface::setDirectory

1 call to ConfigImporterService::setDirectory()
ConfigImporterService::__construct in src/ConfigImporterService.php
ConfigImporterService constructor.

File

src/ConfigImporterService.php, line 198

Class

ConfigImporterService
Class ConfigImporterService.

Namespace

Drupal\config_import

Code

public function setDirectory($directory) {
  if (!is_dir($directory)) {
    throw new \InvalidArgumentException($directory . ' - is not valid path or type of directory with configurations.');
  }
  $this->directory = $directory;
}