Initial commit
This commit is contained in:
55
Plugin.php
Normal file
55
Plugin.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php namespace NicoSt\GCalendar;
|
||||
|
||||
use System\Classes\PluginBase;
|
||||
use System\Classes\SettingsManager;
|
||||
|
||||
class Plugin extends PluginBase {
|
||||
|
||||
public function pluginDetails() {
|
||||
return [
|
||||
'name' => 'nicost.gcalendar::lang.plugin.name',
|
||||
'description' => 'nicost.gcalendar::lang.plugin.description',
|
||||
'author' => 'Nico Störzbach',
|
||||
'icon' => 'icon-calendar',
|
||||
];
|
||||
}
|
||||
|
||||
public function registerComponents() {
|
||||
return [
|
||||
'NicoSt\GCalendar\Components\Upcoming' => 'upcoming',
|
||||
'NicoSt\GCalendar\Components\EmbeddedCalendar' => 'embeddedCalendar'
|
||||
];
|
||||
}
|
||||
|
||||
public function registerFormWidgets() {
|
||||
return [
|
||||
'NicoSt\GCalendar\FormWidgets\OAuth' => 'OAuth',
|
||||
'NicoSt\GCalendar\FromWidgets\CalendarSelector' => 'CalendarSelector'
|
||||
];
|
||||
}
|
||||
|
||||
public function registerSettings() {
|
||||
return [
|
||||
'settings' => [
|
||||
'label' => 'nicost.gcalendar::lang.settings.label',
|
||||
'description' => 'nicost.gcalendar::lang.settings.description',
|
||||
'category' => SettingsManager::CATEGORY_MISC,
|
||||
'icon' => 'icon-calendar',
|
||||
'class' => 'NicoSt\GCalendar\Models\Settings',
|
||||
'order' => 500,
|
||||
'keywords' => '',
|
||||
'permissions' => ['nicost.gcalendar.access_config']
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function registerPermissions() {
|
||||
return [
|
||||
'nicost.gcalendar.access_config' => [
|
||||
'label' => 'Manage G-Calendar',
|
||||
'tab' => 'G-Calendar',
|
||||
'order' => 200
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user