Skip to content
docsv0.13.1

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

Parameters of __construct()
NameTypeDescription
$namestringPlugin name (unique registry key), e.g. "MailPlugin".
$versionstringDeclared plugin version (semver string).
$authorstringAuthor from the plugin metadata.
$sitestringAuthor/plugin site URL from the metadata.
$typestringPlugin type (e.g. "Web", "CLI", "Mixed", "Service").
$installedboolWhether the plugin is installed.
$enabledboolWhether 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): self

The same record with the enabled flag replaced.

Parameters

Parameters of withEnabled()
NameTypeDescription
$enabledbool