Creating a Package Plugin
Packages are plugins that implement the PackageBase class. They should reside in your module's /src/Plugin/Package directory. No functions are required - just the plugin annotation which is explained in the Package annotation class.
If your Package is configurable by the user, you should implement the three form functions found in the PackageBase class, set your configurable annotation to TRUE, and provide the default settings values in the default_settings annotation. This will expose a Settings link next to your package if the user has enabled it.
Your Package can access the user's settings via $this->getSettings() from within any function or they can be accessed via the service.
There are also example modules which can serve as a guide for creating your own Packages.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion