-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlugin.php
More file actions
45 lines (38 loc) · 1.1 KB
/
Copy pathPlugin.php
File metadata and controls
45 lines (38 loc) · 1.1 KB
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
<?php namespace Sewa\Mediafile;
use System\Classes\PluginBase;
use System\Classes\CombineAssets;
use App;
use Event;
class Plugin extends PluginBase
{
public function boot()
{
// Check if we are currently in backend module.
if (!App::runningInBackend()) {
return;
}
}
public function registerComponents()
{
}
public function registerSettings()
{
}
public function register()
{
$this->registerConsoleCommand('mediafile:convert', 'Sewa\Mediafile\Console\Convert');
$this->registerConsoleCommand('mediafile:selectframe', 'Sewa\Mediafile\Console\SelectFrame');
CombineAssets::registerCallback(function($combiner) {
$combiner->registerBundle('~/plugins/sewa/mediafile/formwidgets/mediafileupload/assets/less/mediafileupload.less');
});
}
public function registerFormWidgets()
{
return [
'Sewa\Mediafile\FormWidgets\MediaFileUpload' => [
'label' => 'MediaFileUpload',
'code' => 'mediafileupload'
]
];
}
}