function FileStorage::getCollectionDirectory

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::getCollectionDirectory()
  2. 10 core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::getCollectionDirectory()
  3. 11.x core/lib/Drupal/Core/Config/FileStorage.php \Drupal\Core\Config\FileStorage::getCollectionDirectory()

Gets the directory for the collection.

Return value

string The directory for the collection.

6 calls to FileStorage::getCollectionDirectory()
FileStorage::deleteAll in core/lib/Drupal/Core/Config/FileStorage.php
Deletes configuration objects whose names start with a given prefix.
FileStorage::ensureStorage in core/lib/Drupal/Core/Config/FileStorage.php
Check if the directory exists and create it if not.
FileStorage::getFilePath in core/lib/Drupal/Core/Config/FileStorage.php
Returns the path to the configuration file.
FileStorage::listAll in core/lib/Drupal/Core/Config/FileStorage.php
Gets configuration object names starting with a given prefix.
InstallStorage::getComponentFolder in core/lib/Drupal/Core/Config/InstallStorage.php
Get folder inside each component that contains the files.

... See full list

File

core/lib/Drupal/Core/Config/FileStorage.php, line 349

Class

FileStorage
Defines the file storage.

Namespace

Drupal\Core\Config

Code

protected function getCollectionDirectory() {
    if ($this->collection == StorageInterface::DEFAULT_COLLECTION) {
        $dir = $this->directory;
    }
    else {
        $dir = $this->directory . '/' . str_replace('.', '/', $this->collection);
    }
    return $dir;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.