You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.1 KiB

3 years ago
  1. <?php namespace Wpstudio\AssetsManifest;
  2. use Backend;
  3. use System\Classes\PluginBase;
  4. /**
  5. * assetsmanifest Plugin Information File
  6. */
  7. class Plugin extends PluginBase
  8. {
  9. /**
  10. * Returns information about this plugin.
  11. *
  12. * @return array
  13. */
  14. public function pluginDetails()
  15. {
  16. return [
  17. 'name' => 'assetsmanifest',
  18. 'description' => 'No description provided yet...',
  19. 'author' => 'wpstudio',
  20. 'icon' => 'icon-leaf'
  21. ];
  22. }
  23. /**
  24. * Register method, called when the plugin is first registered.
  25. *
  26. * @return void
  27. */
  28. public function register()
  29. {
  30. }
  31. /**
  32. * Boot method, called right before the request route.
  33. *
  34. * @return array
  35. */
  36. public function boot()
  37. {
  38. }
  39. /**
  40. * Registers any front-end components implemented in this plugin.
  41. *
  42. * @return array
  43. */
  44. public function registerComponents()
  45. {
  46. return []; // Remove this line to activate
  47. return [
  48. 'Wpstudio\Assetsmanifest\Components\MyComponent' => 'myComponent',
  49. ];
  50. }
  51. /**
  52. * Registers any back-end permissions used by this plugin.
  53. *
  54. * @return array
  55. */
  56. public function registerPermissions()
  57. {
  58. return []; // Remove this line to activate
  59. return [
  60. 'wpstudio.assetsmanifest.some_permission' => [
  61. 'tab' => 'assetsmanifest',
  62. 'label' => 'Some permission'
  63. ],
  64. ];
  65. }
  66. /**
  67. * Registers back-end navigation items for this plugin.
  68. *
  69. * @return array
  70. */
  71. public function registerNavigation()
  72. {
  73. return []; // Remove this line to activate
  74. return [
  75. 'assetsmanifest' => [
  76. 'label' => 'assetsmanifest',
  77. 'url' => Backend::url('wpstudio/assetsmanifest/mycontroller'),
  78. 'icon' => 'icon-leaf',
  79. 'permissions' => ['wpstudio.assetsmanifest.*'],
  80. 'order' => 500,
  81. ],
  82. ];
  83. }
  84. }