def items_by_configlets(self, group): ret = list() pu = self.context.plone_utils cp_items = ControlPanelItems(self.context) configlets = cp_items.items_by_group(group) for item in configlets: if not item['available'] or not item['allowed']: continue try: icon = pu.getIconFor('controlpanel', item['id']) except KeyError, e: icon = '' ret.append(nav_item(item_id(item['id']), icon, item['title'], False, False)) # XXX selected.
def _action(self): cp_items = ControlPanelItems(self.context) return cp_items.item_by_id(self._raw_uid, groups=[self._group])
def _ac_actions(self): cp_items = ControlPanelItems(self.context) return [i['id'] for i in cp_items.items_by_group('Products')]
def provides(self, uid): cp_items = ControlPanelItems(self.context) cp_item = cp_items.item_by_id(uid, groups=self.CONFIGLET_GROUPS) if cp_item: return True return False