First setup: module registry, switchable modules, permissions

This commit is contained in:
Matthijs Iriks committed 2026-12-04 01:18:14 +01:00
commit 936c794597
52 files changed
+1304

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
<?php
namespace IriksIT\Manager\Modules\Posts;
use IriksIT\Manager\Modules\BaseModule;
class PostsModule extends BaseModule
{
public function key(): string
{
return 'posts';
}
public function label(): string
{
return 'Posts';
}
public function enabledByDefault(): bool
{
return false;
}
public function permissions(): array
{
return [
'posts.view' => 'See the posts, drafts included',
'posts.write' => 'Write and change posts',
'posts.publish' => 'Publish and unpublish posts',
'posts.delete' => 'Delete posts',
];
}
public function navigation(): array
{
return [
['label' => 'Posts', 'route' => 'manager.posts.index', 'permission' => 'posts.view'],
];
}
}