wi-adrema-plugin/Plugin.php

105 lines
2.2 KiB
PHP
Raw Normal View History

2024-01-29 23:36:43 +01:00
<?php
namespace Silva\Adrema;
use Backend;
2024-02-01 00:23:58 +01:00
use Silva\Adrema\Components\EventIndex;
2024-01-29 23:36:43 +01:00
use Silva\Adrema\Models\Settings;
use System\Classes\PluginBase;
/**
* Plugin Information File
*
* @link https://docs.octobercms.com/3.x/extend/system/plugins.html
*/
class Plugin extends PluginBase
{
/**
* pluginDetails about this plugin.
*/
public function pluginDetails()
{
return [
'name' => 'adrema',
'description' => 'No description provided yet...',
'author' => 'silva',
'icon' => 'icon-leaf'
];
}
/**
* register method, called when the plugin is first registered.
*/
public function register()
{
//
}
/**
* boot method, called right before the request route.
*/
public function boot()
{
//
}
/**
* registerComponents used by the frontend.
*/
public function registerComponents()
{
return [
2024-02-01 00:23:58 +01:00
EventIndex::class => 'adrema_event_index',
2024-01-29 23:36:43 +01:00
];
}
/**
* registerPermissions used by the backend.
*/
public function registerPermissions()
{
return []; // Remove this line to activate
return [
'silva.adrema.some_permission' => [
'tab' => 'adrema',
'label' => 'Some permission'
],
];
}
/**
* registerPermissions used by the backend.
*/
public function registerSettings()
{
return [
'settings' => [
'label' => 'Adrema',
'description' => 'setting_description',
'category' => 'CATEGORY_CMS',
'icon' => 'icon-cog',
'class' => Settings::class,
]
];
}
/**
* registerNavigation used by the backend.
*/
public function registerNavigation()
{
return []; // Remove this line to activate
return [
'adrema' => [
'label' => 'adrema',
'url' => Backend::url('silva/adrema/mycontroller'),
'icon' => 'icon-leaf',
'permissions' => ['silva.adrema.*'],
'order' => 500,
],
];
}
}