|
Last change
on this file since 1140 was
372,
checked in by chervol, 19 years ago
|
|
fixed interfaces
|
|
File size:
677 bytes
|
| Line | |
|---|
| 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 | |
|---|
| 7 | from utils import updateMenu |
|---|
| 8 | from config import MANAGE_PERMISSION, PROJECT_NAME, UNIQUE_ID |
|---|
| 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 | |
|---|
| 19 | security.declareProtected(MANAGE_PERMISSION, 'regenerateMenu') |
|---|
| 20 | def regenerateMenu(self): |
|---|
| 21 | portal = getToolByName(self, 'portal_url').getPortalObject() |
|---|
| 22 | updateMenu(portal) |
|---|
| 23 | |
|---|
| 24 | InitializeClass(DropDownMenuTool) |
|---|
Note: See
TracBrowser
for help on using the repository browser.