PluginRecord
Readonly snapshot of one plugin's registration state. The fields mirror exactly what the host's activation store persists today (name/version/author/site/type/installed/enabled plus the remote-install trio source/installedVersion/installedAt and the composer ledger).
PluginRecord::__construct()
public function __construct(string $name, string $version, string $author, string $site, string $type, bool $installed, bool $enabled, ?string $source = null, ?string $installedVersion = null, ?DateTimeImmutable $installedAt = null, ?array $composerDeps = null):Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | Plugin name (unique registry key), e.g. "MailPlugin". |
| $version | string | Declared plugin version (semver string). |
| $author | string | Author from the plugin metadata. |
| $site | string | Author/plugin site URL from the metadata. |
| $type | string | Plugin type (e.g. "Web", "CLI", "Mixed", "Service"). |
| $installed | bool | Whether the plugin is installed. |
| $enabled | bool | Whether the plugin is enabled (boots). |
| $source | (string | null) | Install source: null/"local" for local, "github:owner/repo" for remote. |
| $installedVersion | (string | null) | Exact version installed from the remote source. |
| $installedAt | (\DateTimeImmutable | null) | When the remote install happened. |
| $composerDeps | (list<string> | null) | Composer package specs installed for this plugin. |
PluginRecord::withEnabled()
public function withEnabled(bool $enabled): selfThe same record with the enabled flag replaced.
Parameters
| Name | Type | Description |
|---|---|---|
| $enabled | bool |