public function DeployManager::getContentFolder in Default Content Deploy 8
Get content folder.
Folder is automatically created on install inside files folder. Or you can override content folder in settings.php file.
If no configuration is found, directory is created automatically at public://content_{hash_salt_derived_key};
@example Backward compatibility usage: $config_directories['content_directory'] = '../content'; $config['content_directory'] = '../content';
@example Recommended usage: $settings['default_content_deploy_content_directory'] = '../content';
Return value
string Return path to the content folder.
Throws
\Exception
File
- src/
DeployManager.php, line 134
Class
Namespace
Drupal\default_content_deployCode
public function getContentFolder() {
$config = $this->config
->get('default_content_deploy.content_directory');
if ($directory = $config
->get('content_directory')) {
return $directory;
}
elseif ($directory = $this->settings
->get('default_content_deploy_content_directory')) {
return $directory;
}
throw new \Exception('Directory for content deploy is not set.');
}