Last change
on this file since 2555 was
372,
checked in by chervol, 18 years ago
|
fixed interfaces
|
File size:
677 bytes
|
Rev | Line | |
---|
[1] | 1 | from Globals import InitializeClass |
---|
| 2 | from OFS.SimpleItem import SimpleItem |
---|
| 3 | from AccessControl import ClassSecurityInfo |
---|
| 4 | |
---|
| 5 | from Products.CMFCore.utils import UniqueObject, getToolByName |
---|
| 6 | |
---|
[372] | 7 | from utils import updateMenu |
---|
| 8 | from config import MANAGE_PERMISSION, PROJECT_NAME, UNIQUE_ID |
---|
[1] | 9 | |
---|
| 10 | |
---|
| 11 | class DropDownMenuTool(UniqueObject, SimpleItem): |
---|
| 12 | |
---|
| 13 | meta_type = 'DropDownMenu Tool' |
---|
| 14 | id = UNIQUE_ID |
---|
| 15 | title="DropDown Menu Tool" |
---|
| 16 | |
---|
| 17 | security = ClassSecurityInfo() |
---|
| 18 | |
---|
[372] | 19 | security.declareProtected(MANAGE_PERMISSION, 'regenerateMenu') |
---|
[1] | 20 | def regenerateMenu(self): |
---|
[372] | 21 | portal = getToolByName(self, 'portal_url').getPortalObject() |
---|
| 22 | updateMenu(portal) |
---|
[1] | 23 | |
---|
| 24 | InitializeClass(DropDownMenuTool) |
---|
Note: See
TracBrowser
for help on using the repository browser.