API / Minn\Admin / PackagesController

PackagesController final readonly class

Minn\Admin\PackagesController · public/minn/src/Minn/Admin/PackagesController.php · 113 lines

Adding and removing themes and extensions from the Extensions view.

Used by 1

Constants and properties

privatereadonly Minn\Ops\Packages $packages

Promoted from the constructor.

privatereadonly Minn\Content\Site $site

Promoted from the constructor.

privatereadonly Minn\Rest\Caller $caller

Promoted from the constructor.

Public

new__construct(Minn\Ops\Packages $packages, Minn\Content\Site $site, Minn\Rest\Caller $caller)#
methodsearchThemes(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/themes/search (floor edit_posts + install_themes)#

Searches the theme directory.

methodinstallTheme(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/themes/install (floor edit_posts + install_themes)#

Installs a theme from the directory by slug.

methoduploadTheme(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/themes/upload (floor edit_posts + install_themes)#

Installs a theme from an uploaded zip.

methoddeleteTheme(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/themes/delete (floor edit_posts + delete_themes)#

Deletes an inactive theme.

methoduploadPlugin(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/plugins/upload (floor edit_posts + install_plugins)#

A plugin zip: a WordPress plugin or a Minn extension.

methodinstallFromUrl(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/plugins/install-url (floor edit_posts + install_plugins)#

A zip URL, or a GitHub owner/repo whose latest release carries a zip asset.

methodsearchPlugins(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/plugins/search (floor edit_posts + install_plugins)#

Searches the plugin directory.

methodpluginInfo(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/plugins/info (floor edit_posts + install_plugins)#

One directory plugin's details.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privateuploaded(Minn\Http\Request $request, string $kind): string#