Package ZenModel :: Module ZenMenuable :: Class ZenMenuable
[hide private]
[frames] | no frames]

Class ZenMenuable

source code

Known Subclasses:
DeviceOrganizer.DeviceOrganizer, Device.Device

ZenMenuable is a mixin providing menuing.

Instance Methods [hide private]
 
manage_addZenMenu(self, id=None, desc='', REQUEST=None)
Add a menu item to this device organizer
source code
 
manage_addZenMenuItem(self, menuid, id=None, description='', action='', permissions=('View'), isdialog=False, isglobal=True, banned_classes=(), allowed_classes=(), ordering=0.0, REQUEST=None)
Add ZenMenuItem
source code
 
manage_deleteZenMenuItem(self, menuid, delids=(), REQUEST=None)
Delete Menu Items
source code
 
manage_saveMenuItemOrdering(self, menuid, REQUEST=None)
Delete Menu Items
source code
 
manage_addItemsToZenMenu(self, menuid, items=[{}])
Add ZenMenuItems to a ZenMenu.
source code
 
buildMenus(self, menudict={})
Build menus from a dictionary.
source code
 
manage_deleteZenMenu(self, delids=(), REQUEST=None)
Delete Menu Items from this object
source code
 
getMenus(self, menuids=None, context=None)
Build menus for this context, acquiring ZenMenus which in turn acquire ZenMenuItems.
source code
Class Variables [hide private]
  security = ClassSecurityInfo()
  __ac_permissions__ = (('Change Device', ('manage_deleteZenMenu...
Method Details [hide private]

manage_addItemsToZenMenu(self, menuid, items=[{}])

source code 
Add ZenMenuItems to a ZenMenu. 
Accepts a list of dictionaries.
Available keyword args:
  id
  description
  action
  permissions
  isglobal
  isdialog
  banned_classes
  allowed_classes

getMenus(self, menuids=None, context=None)

source code 

Build menus for this context, acquiring ZenMenus which in turn acquire ZenMenuItems.

Pass it a menuid for a list of menuitems, a sequence of menuids for a dict of lists of items, or nothing for a dict of all available menus.

Class Variable Details [hide private]

__ac_permissions__

Value:
(('Change Device',
  ('manage_deleteZenMenuItem',
   'buildMenus',
   'manage_addZenMenuItem',
   'manage_deleteZenMenu',
   'manage_addZenMenu',
   'manage_addItemsToZenMenu',
   'manage_saveMenuItemOrdering')))