class ContentFileStorageFactory in Content Synchronization 8
Same name and namespace in other branches
- 8.2 src/Content/ContentFileStorageFactory.php \Drupal\content_sync\Content\ContentFileStorageFactory
- 3.0.x src/Content/ContentFileStorageFactory.php \Drupal\content_sync\Content\ContentFileStorageFactory
Provides a factory for creating content file storage objects.
Hierarchy
- class \Drupal\content_sync\Content\ContentFileStorageFactory
Expanded class hierarchy of ContentFileStorageFactory
File
- src/
Content/ ContentFileStorageFactory.php, line 8
Namespace
Drupal\content_sync\ContentView source
class ContentFileStorageFactory {
/**
* Returns a FileStorage object working with the active content directory.
*
* @return \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.
*/
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));
}
/**
* Returns a FileStorage object working with the sync content directory.
*
* @return \Drupal\Core\Config\FileStorage FileStorage
*/
public static function getSync() {
// Load the class from a different namespace.
$class = "Drupal\\Core\\Config\\FileStorage";
return new $class(content_sync_get_content_directory(CONFIG_SYNC_DIRECTORY));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContentFileStorageFactory:: |
public static | function | Returns a FileStorage object working with the active content directory. | |
ContentFileStorageFactory:: |
public static | function | Returns a FileStorage object working with the sync content directory. |