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:
- Write your own package source service that Implements
Drupal\cohesion_sync\Services\PackageSourceServiceInterface
interface. - 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. - 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.