samsonos/cms_ui

SamsonCMS generic user interface

dev-master 2014-12-16 11:47 UTC

This package is not auto-updated.

Last update: 2024-11-09 16:42:52 UTC


README

#SamsonCMS User interface

This module gives abstraction level for working with all UI components in SamsonCMS environment.

Latest Stable Version Build Status Code Coverage Code Climate Total Downloads Scrutinizer Code Quality

Adding item to main menu

When UI creates workspace main menu container an cms_ui.mainmenu_created event is fired. Example of how to add custom menu item:

  • Subscribe to event
  • Add menu item, as you have an access to menu container
// Subscribe to UI main menu creation event
Event::subscribe('cms_ui.mainmenu_created', array($this, 'mainMenuItem'));

class MyApplication {
    public function mainMenuItem(\samsonos\cms\ui\Menu $menu, \samsonos\cms\ui\UIApplication $ui)
    {
        $menu->add(new MenuItem());
    }
}