-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.php
executable file
·81 lines (70 loc) · 2.17 KB
/
Plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php namespace Dilexus\Octobase;
//
// Copyright 2023 Chatura Dilan Perera. All rights reserved.
// Use of this source code is governed by license that can be
// found in the LICENSE file.
// Website: https://www.dilan.me
//
use Dilexus\Octobase\Classes\Api\Middleware\OctobaseAuthAdmin;
use Dilexus\Octobase\Classes\Api\Middleware\OctobaseAuthGroups;
use Dilexus\Octobase\Classes\Api\Middleware\OctobaseAuthPublic;
use Dilexus\Octobase\Classes\Api\Middleware\OctobaseAuthRegistered;
use Dilexus\Octobase\Classes\Api\Middleware\OctobaseAuthRestricted;
use System\Classes\PluginBase;
/**
* Plugin class
*/
class Plugin extends PluginBase
{
/**
* register method, called when the plugin is first registered.
*/
public function register()
{
$this->app->singleton('obRegistered', function ($app) {
return new OctobaseAuthRegistered;
});
$this->app->singleton('obAdmin', function ($app) {
return new OctobaseAuthAdmin;
});
$this->app->singleton('obPublic', function ($app) {
return new OctobaseAuthPublic;
});
$this->app->singleton('obRestricted', function ($app) {
return new OctobaseAuthRestricted;
});
$this->app->singleton('obGroups', function ($app) {
return new OctobaseAuthGroups;
});
}
/**
* boot method, called right before the request route.
*/
public function boot()
{
}
/**
* registerComponents used by the frontend.
*/
public function registerComponents()
{
}
/**
* registerSettings used by the backend.
*/
public function registerSettings()
{
return [
'settings' => [
'label' => 'Octobase Settings',
'description' => 'Octobase Settings to manage Octobase Plugin',
'category' => 'Octobase',
'icon' => 'icon-leaf',
'class' => 'Dilexus\Octobase\Models\Settings',
'order' => 500,
'permissions' => ['dilexus.octobase.manage'],
'keywords' => 'octobase'
]
];
}
}