source: products/qPloneDropDownMenu/tags/0.2.1/DropDownMenuTool.py @ 1141

Last change on this file since 1141 was 372, checked in by chervol, 14 years ago

fixed interfaces

File size: 677 bytes
Line 
1from Globals import InitializeClass
2from OFS.SimpleItem import SimpleItem
3from AccessControl import ClassSecurityInfo
4
5from Products.CMFCore.utils import UniqueObject, getToolByName
6
7from utils import updateMenu
8from config import MANAGE_PERMISSION, PROJECT_NAME, UNIQUE_ID
9
10
11class DropDownMenuTool(UniqueObject, SimpleItem):
12
13    meta_type = 'DropDownMenu Tool'
14    id = UNIQUE_ID
15    title="DropDown Menu Tool"
16
17    security = ClassSecurityInfo()
18
19    security.declareProtected(MANAGE_PERMISSION, 'regenerateMenu')
20    def regenerateMenu(self):
21        portal = getToolByName(self, 'portal_url').getPortalObject()
22        updateMenu(portal)
23
24InitializeClass(DropDownMenuTool)
Note: See TracBrowser for help on using the repository browser.