2014-09-20 07:59:19 +00:00
|
|
|
<?php namespace October\Tester;
|
2014-05-14 13:24:20 +00:00
|
|
|
|
|
|
|
|
use System\Classes\PluginBase;
|
|
|
|
|
|
|
|
|
|
class Plugin extends PluginBase
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public function pluginDetails()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'name' => 'October Test Plugin',
|
|
|
|
|
'description' => 'Test plugin used by unit tests.',
|
|
|
|
|
'author' => 'Alexey Bobkov, Samuel Georges'
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function registerComponents()
|
|
|
|
|
{
|
|
|
|
|
return [
|
2014-09-20 07:59:19 +00:00
|
|
|
'October\Tester\Components\Archive' => 'testArchive',
|
|
|
|
|
'October\Tester\Components\Post' => 'testPost'
|
2014-05-14 13:24:20 +00:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-25 01:07:51 +00:00
|
|
|
public function registerFormWidgets()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'October\Tester\FormWidgets\Preview' => [
|
|
|
|
|
'label' => 'Preview',
|
|
|
|
|
'code' => 'preview'
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-28 08:52:12 +00:00
|
|
|
public function registerNavigation()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'blog' => [
|
|
|
|
|
'label' => 'Blog',
|
|
|
|
|
'url' => 'http://rainlab.tld/blog/posts',
|
|
|
|
|
'icon' => 'icon-pencil',
|
|
|
|
|
'permissions' => ['rainlab.blog.*'],
|
|
|
|
|
'order' => 500,
|
|
|
|
|
|
|
|
|
|
'sideMenu' => [
|
|
|
|
|
'posts' => [
|
|
|
|
|
'label' => 'Posts',
|
|
|
|
|
'icon' => 'icon-copy',
|
|
|
|
|
'url' => 'http://rainlab.tld/blog/posts',
|
|
|
|
|
'permissions' => ['rainlab.blog.access_posts']
|
|
|
|
|
],
|
|
|
|
|
'categories' => [
|
|
|
|
|
'label' => 'Categories',
|
|
|
|
|
'icon' => 'icon-list-ul',
|
|
|
|
|
'url' => 'http://rainlab.tld/blog/categories',
|
|
|
|
|
'permissions' => ['rainlab.blog.access_categories']
|
|
|
|
|
],
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-14 13:24:20 +00:00
|
|
|
}
|