API / Minn\Admin / SiteController

SiteController final readonly class

Minn\Admin\SiteController · public/minn/src/Minn/Admin/SiteController.php · 90 lines

The small Settings-view routes of minn-admin/v1: the site logo, the permalink structure, the spam queue, and the months the library spans.

Used by 1

Constants and properties

privatereadonly Minn\Db $db

Promoted from the constructor.

privatereadonly Minn\Content\Site $site

Promoted from the constructor.

privatereadonly Minn\Content\Posts $posts

Promoted from the constructor.

privatereadonly Minn\Front\Permalinks $permalinks

Promoted from the constructor.

privatereadonly Minn\Rest\Caller $caller

Promoted from the constructor.

Public

new__construct(Minn\Db $db, Minn\Content\Site $site, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks, Minn\Rest\Caller $caller)#
methodGET /minn-admin/v1/site-logo (floor edit_posts)#

The site logo attachment.

methodpermalinks(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/permalinks (floor edit_posts)#

The permalink structure.

methodspam(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/spam (floor edit_posts)#

The spam settings.

methodmediaMonths(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/media/months (floor edit_posts)#

The months the library has uploads in.

Internals 1

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

privatelogoUrl(int $id): string#

The custom logo's medium rendition, the size the app's card shows.