Loading...

Customising package source types 

Site Studio Sync includes a source type of default_module_package. This type is handled by  the modules/cohesion_sync/src/Services/DefaultModulePackage.php service. Package source type services are gathered by PackageSourceManager service collector using sitestudio_package_source tag. It is possible to add your own custom types that would handle default packages in a different manner, for example fetching package stored in a remote FTP or AWS S3 bucket. To do so, you would need to follow these steps:

  1. Write your own package source service that Implements Drupal\cohesion_sync\Services\PackageSourceServiceInterface interface.
  2. Register your service using sitestudio_package_source tag and appropriate priority, depending if you are registering a new source type or overriding an existing one.
  3. Define your site_studio.packages.yml containing your new (or overridden) type and relevant metadata in source property.

More information about service collection and service tags is available here.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation