First setup: module registry, switchable modules, permissions
This commit is contained in:
commit
936c794597
52 files changed
+1304
No files matched your search
@@ -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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user