Skip to content
Corex

AddonCatalogService

Corex\Config\Addons\AddonCatalogService · class · Config layer

Pure add-on catalog projection (spec 068). It turns the already-resolved {@see AddonView} list into the truthful summary counts shown on the Add-ons screen and the Overview, plus the honest missing-package installation path. It never fabricates an update count or a remote source — CoreX ships no update-checker, so updates are reported as untracked, and installing a missing package is a local, manual action. WordPress-free, so it is unit-testable.

filter(array $views, string $filter): array

Section titled “filter(array $views, string $filter): array”

Narrows the catalog to one state so the grid can be scanned. The buckets are mutually exclusive and cover every view, and they are keyed on {@see AddonView::status()} — the same resolution that prints the badge on each card, so filtering by “Active” returns exactly the cards badged Active and nothing that merely looks like it. “Inactive” is deliberately installed but not running, which is a state an admin can act on (toggle it, satisfy a dependency, turn on a flag). A package that is not on disk is a different problem with a different fix, so it gets its own bucket instead of being blurred into this one.

How many add-ons each filter would show, so a filter control can carry a real number and an admin can see a bucket is empty before clicking into it.

Add-ons present in the catalog whose plugin package is not installed on disk, each with the real resolution path. Empty when every catalogued add-on is installed.