WaiversPlugin
extends BasePlugin
in package
implements
KMPPluginInterface
Waivers Plugin - Gathering Waiver Tracking System
Provides comprehensive waiver management for gatherings, including waiver templates, upload tracking, compliance monitoring, and decline/rejection workflows.
Tags
Table of Contents
Interfaces
- KMPPluginInterface
- Plugin architecture contract for KMP plugins.
Properties
- $_migrationOrder : int
- Plugin migration order for KMP plugin system
Methods
- __construct() : mixed
- Constructor
- bootstrap() : void
- Plugin Bootstrap Process
- console() : CommandCollection
- Configure Plugin Console Commands
- getMigrationOrder() : int
- Get Migration Order
- middleware() : MiddlewareQueue
- Configure Plugin Middleware
- routes() : void
- Configure Plugin Routes
- services() : void
- Configure Plugin Services
- initializeSettings() : void
- Initialize Plugin Settings
Properties
$_migrationOrder
Plugin migration order for KMP plugin system
protected
int
$_migrationOrder
= 0
Migration order priority for database setup
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $config = [] ]) : mixed
Initialize the plugin with migration configuration from plugins.php.
Parameters
- $config : array<string|int, mixed> = []
-
Plugin configuration including migrationOrder
bootstrap()
Plugin Bootstrap Process
public
bootstrap(PluginApplicationInterface $app) : void
This method is called during application bootstrap and handles:
- Navigation item registration
- View cell registration for dashboard widgets
- Event listener attachment
- Service initialization
The bootstrap process runs early in the application lifecycle, making it ideal for registering services and setting up plugin infrastructure.
Parameters
- $app : PluginApplicationInterface
-
The application instance
console()
Configure Plugin Console Commands
public
console(CommandCollection $commands) : CommandCollection
Register CLI commands that are specific to this plugin. Commands can be used for:
- Data migration and import
- Batch processing
- Maintenance tasks
- Report generation
Parameters
- $commands : CommandCollection
-
The command collection to modify
Return values
CommandCollection —The modified command collection
getMigrationOrder()
Get Migration Order
public
getMigrationOrder() : int
Returns the migration order priority for this plugin, which determines the sequence in which plugin migrations are executed during system setup. The Template plugin uses default order (0) as it has no special dependencies.
Return values
int —Migration order priority
middleware()
Configure Plugin Middleware
public
middleware(MiddlewareQueue $middlewareQueue) : MiddlewareQueue
Add middleware specific to this plugin. Middleware can handle:
- Request preprocessing
- Response postprocessing
- Authentication checks
- Rate limiting
- Custom header management
Parameters
- $middlewareQueue : MiddlewareQueue
-
The middleware queue to modify
Return values
MiddlewareQueue —The modified middleware queue
routes()
Configure Plugin Routes
public
routes(RouteBuilder $routes) : void
Defines the URL routes for this plugin. All plugin routes are automatically prefixed with the plugin path (e.g., /template/...).
The plugin uses fallback routing for standard controller/action patterns, but custom routes can be added for specific workflows.
Parameters
- $routes : RouteBuilder
-
The route builder to configure
services()
Configure Plugin Services
public
services(ContainerInterface $container) : void
Register services in the dependency injection container. This is where you bind interfaces to implementations for service classes.
Services registered here can be injected into controllers, other services, and commands through constructor injection.
Parameters
- $container : ContainerInterface
-
The DI container
initializeSettings()
Initialize Plugin Settings
protected
initializeSettings() : void
Sets up default configuration values in the KMP settings system. This ensures that the plugin has sensible defaults on first installation.
Settings are versioned to allow automatic updates when the plugin is upgraded.