Esempio n. 1
0
    def _initSite(self, with_icon=False):
        from OFS.Folder import Folder
        from Products.CMFActionIcons.ActionIconsTool import ActionIconsTool

        self.root.site = Folder(id='site')
        site = self.root.site
        tool = ActionIconsTool()
        site._setObject(tool.getId(), tool)

        if with_icon:
            tool.addActionIcon(category=self.CATEGORY,
                               action_id=self.ACTION_ID,
                               title=self.TITLE,
                               priority=self.PRIORITY,
                               icon_expr=self.ICON_EXPR)
        return site
Esempio n. 2
0
    def _initSite(self, with_icon=False):
        from OFS.Folder import Folder
        from Products.CMFActionIcons.ActionIconsTool import ActionIconsTool

        _setUpDefaultTraversable()

        self.root.site = Folder(id='site')
        site = self.root.site
        tool = ActionIconsTool()
        site._setObject(tool.getId(), tool)

        sm = getSiteManager()
        sm.registerUtility(site.portal_actionicons, IActionIconsTool)

        if with_icon:
            tool.addActionIcon(category=self.CATEGORY,
                               action_id=self.ACTION_ID,
                               title=self.TITLE,
                               priority=self.PRIORITY,
                               icon_expr=self.ICON_EXPR)
        return site
Esempio n. 3
0
    def _makeOne(self, *args, **kw):

        from Products.CMFActionIcons.ActionIconsTool import ActionIconsTool

        return ActionIconsTool(*args, **kw)