You are here

public static function ContentFileStorageFactory::getSync in Content Synchronization 3.0.x

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

Returns a FileStorage object working with the sync content directory.

Return value

\Drupal\Core\Config\FileStorage FileStorage

1 string reference to 'ContentFileStorageFactory::getSync'
content_sync.services.yml in ./content_sync.services.yml
content_sync.services.yml

File

src/Content/ContentFileStorageFactory.php, line 29

Class

ContentFileStorageFactory
Provides a factory for creating content file storage objects.

Namespace

Drupal\content_sync\Content

Code

public static function getSync() {

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