Skip to content

Task guide

github-actions[bot] edited this page Dec 2, 2026 · 2 revisions

Written against v0.2.0.

Another Aether add-on needs a field or utility that Aether Shared will hold, and should depend on the package instead of carrying its own copy.

Steps

  1. Require the package from the add-on's repository: composer require uams-web/aether-shared. The package is not on Packagist yet, so first add a path repository for it, as the development guide shows.
  2. Keep the constraint compatible with the package's floors: PHP 8.4 or later and Statamic 6.35 or later.
  3. Import shared classes from the UAMSWeb\Aether\Shared namespace; the Reference lists them. The package requires uams-web/aether-enums, so Composer installs it alongside.
  4. Run the add-on's own tests with the package installed, and check that the package loaded in a host install.

Registering a container-specific augmented asset

Since v0.2.0. An add-on that gives one asset container its own augmented class, such as a news release container, registers it through UAMSWeb\Aether\Shared\Assets\AugmentedAssetHook:

  1. Make the class extend Statamic's AugmentedAsset, use the ComputesAssetCreditText and ComputesAssetIptcDigitalSourceValues traits, and implement ProvidesComputedCreditText.
  2. Register AugmentedAssetHook::pipelineHook('<container handle>', YourClass::class) with AugmentedAssetHook::registerPipelineHook(). Pass the asset classes to hook as the second argument when the application has its own subclass of the asset.
  3. A class that implements ProvidesComputedCreditText is kept whether it registers before or after the host's credit fallback. A class that does not implement it is replaced by the fallback when the fallback runs after it.

Reference

  • Reference: the namespace, the shared classes and the service provider this guide refers to.

Clone this wiki locally