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.

40 lines
1.4 KiB

5 years ago
  1. # Menu plugin
  2. Combines menu items from different plugins
  3. To add menu items add to class`Plugin`
  4. public function addToMainNavigation()
  5. {
  6. return [
  7. '{tab_name}' => [
  8. '{name}' => [
  9. 'label' => {label},
  10. 'url' => {url},
  11. 'permissions' => [{permission}, ...],
  12. 'icon' => {icon},
  13. 'order' => {order},
  14. //'first' => true,
  15. 'subMenu' => [
  16. '{tab_name}' => [
  17. '{name}' => [
  18. 'label' => {label},
  19. 'url' => {url},
  20. 'permissions' => [{permission}, ...],
  21. 'icon' => {icon},
  22. 'order' => {order},
  23. ],
  24. ...
  25. ],
  26. ...
  27. ],
  28. ...
  29. ],
  30. ...
  31. ];
  32. }
  33. Default tab name is {default_name}
  34. For change default tab name, in `Plugin.php` file, declare the constant `DEFAULT_MENU_NAME`
  35. If the `first` element is specified, it will immediately open when you click on the menu.
  36. If not, the menu or submenu page will be opened.