Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
89 lines
2.2 KiB
Plaintext
89 lines
2.2 KiB
Plaintext
<?php
|
|
|
|
namespace {{ plugin_namespace }};
|
|
|
|
use Backend\Facades\Backend;
|
|
use Backend\Models\UserRole;
|
|
use System\Classes\PluginBase;
|
|
|
|
/**
|
|
* {{ name }} Plugin Information File
|
|
*/
|
|
class Plugin extends PluginBase
|
|
{
|
|
/**
|
|
* Returns information about this plugin.
|
|
*/
|
|
public function pluginDetails(): array
|
|
{
|
|
return [
|
|
'name' => '{{ plugin_id }}::lang.plugin.name',
|
|
'description' => '{{ plugin_id }}::lang.plugin.description',
|
|
'author' => '{{ author }}',
|
|
'icon' => 'icon-leaf'
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Register method, called when the plugin is first registered.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* Boot method, called right before the request route.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* Registers any frontend components implemented in this plugin.
|
|
*/
|
|
public function registerComponents(): array
|
|
{
|
|
return []; // Remove this line to activate
|
|
|
|
return [
|
|
\{{ plugin_namespace }}\Components\MyComponent::class => 'myComponent',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Registers any backend permissions used by this plugin.
|
|
*/
|
|
public function registerPermissions(): array
|
|
{
|
|
return []; // Remove this line to activate
|
|
|
|
return [
|
|
'{{ plugin_id }}.some_permission' => [
|
|
'tab' => '{{ plugin_id }}::lang.plugin.name',
|
|
'label' => '{{ plugin_id }}::lang.permissions.some_permission',
|
|
'roles' => [UserRole::CODE_DEVELOPER, UserRole::CODE_PUBLISHER],
|
|
],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Registers backend navigation items for this plugin.
|
|
*/
|
|
public function registerNavigation(): array
|
|
{
|
|
return []; // Remove this line to activate
|
|
|
|
return [
|
|
'{{ lower_name }}' => [
|
|
'label' => '{{ plugin_id }}::lang.plugin.name',
|
|
'url' => Backend::url('{{ plugin_url }}/mycontroller'),
|
|
'icon' => 'icon-leaf',
|
|
'permissions' => ['{{ plugin_id }}.*'],
|
|
'order' => 500,
|
|
],
|
|
];
|
|
}
|
|
}
|