<?php namespace {{studly_author}}\{{studly_plugin}};

use Backend;
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' => '{{plugin}}',
            'description' => 'No description provided yet...',
            'author' => '{{author}}',
            '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 []; // Remove this line to activate

        return [
            '{{studly_author}}\{{studly_plugin}}\Components\MyComponent' => 'myComponent',
        ];
    }

    /**
     * registerPermissions used by the backend.
     */
    public function registerPermissions()
    {
        return []; // Remove this line to activate

        return [
            '{{lower_namespace_code}}.some_permission' => [
                'tab' => '{{plugin}}',
                'label' => 'Some permission'
            ],
        ];
    }

    /**
     * registerNavigation used by the backend.
     */
    public function registerNavigation()
    {
        return []; // Remove this line to activate

        return [
            '{{lower_plugin}}' => [
                'label' => '{{plugin}}',
                'url' => Backend::url('{{lower_author}}/{{lower_plugin}}/mycontroller'),
                'icon' => 'icon-leaf',
                'permissions' => ['{{lower_namespace_code}}.*'],
                'order' => 500,
            ],
        ];
    }
}
