Exemplo 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
Exemplo n.º 2
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
Exemplo n.º 3
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
Exemplo n.º 4
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