You are here

public static function ContentFileStorageFactory::getActive in Content Synchronization 8

Same name and namespace in other branches
  1. 8.2 src/Content/ContentFileStorageFactory.php \Drupal\content_sync\Content\ContentFileStorageFactory::getActive()
  2. 3.0.x src/Content/ContentFileStorageFactory.php \Drupal\content_sync\Content\ContentFileStorageFactory::getActive()

Returns a FileStorage object working with the active content directory.

Return value

\Drupal\Core\Config\FileStorage FileStorage

Deprecated

in Drupal 8.0.x and will be removed before 9.0.0. Drupal core no longer creates an active directory.

File

src/Content/ContentFileStorageFactory.php, line 18

Class

ContentFileStorageFactory
Provides a factory for creating content file storage objects.

Namespace

Drupal\content_sync\Content

Code

public static function getActive() {

  // Load the class from a different namespace.
  $class = "Drupal\\Core\\Config\\FileStorage";
  return new $class(content_sync_get_content_directory(CONFIG_ACTIVE_DIRECTORY));
}