Package org.ametys.web.clientsideelement
Class ContentTypesGallery
- All Implemented Interfaces:
ClientSideElement
,MenuClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
This element finally creates a gallery button with one item per content type
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.core.ui.SimpleMenu
SimpleMenu.GalleryGroup, SimpleMenu.GalleryItem, SimpleMenu.UnresolvedItem
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
Field Summary
Modifier and TypeFieldDescriptionprotected PageDAO
The DAO for pagesprotected AmetysObjectResolver
Repository contentFields inherited from class org.ametys.cms.clientsideelement.ContentTypesGallery
_contentTypeExtensionPoint, _i18nUtils, _languagesManager, _rootContentHelper
Fields inherited from class org.ametys.core.ui.SimpleMenu
_galleryItems, _menuItemManager, _menuItems, _primaryMenuItem, _ribbonControlManager, _smanager, _unresolvedMenuItems
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAvailableContentTypes
(String pageId, String zoneName) Get the available content types for given page and zoneprotected boolean
hasRight
(ContentType cType) Test if the current user has the right needed by the content type to create a content.void
service
(ServiceManager smanager) Methods inherited from class org.ametys.cms.clientsideelement.ContentTypesGallery
_addContentTypeConfiguration, _addContentTypeIconsConfiguration, _addGroupContentTypeConfiguration, _addRightsOnContentTypeConfiguration, _configureScript, _getContentTypesByGroup, _getGalleryItems, _getI18nizableTextConfiguration, addContentType, getScripts, isValidContentType
Methods inherited from class org.ametys.core.ui.SimpleMenu
_addDependencies, _configureClass, _configureGalleries, _configureGroupGallery, _configureItemsMenu, _getGalleryItemManager, _getGalleryItems, _getMenuItems, configure, getReferencedClientSideElements, getRights
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureParameters, configureInitialParameters
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getScripts, hasRight, setPluginInfo, toString
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_pageDAO
The DAO for pages -
_resolver
Repository content
-
-
Constructor Details
-
ContentTypesGallery
public ContentTypesGallery()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classContentTypesGallery
- Throws:
ServiceException
-
getAvailableContentTypes
Get the available content types for given page and zone- Parameters:
pageId
- The page's idzoneName
- The zone's name- Returns:
- The available content types
-
hasRight
Description copied from class:ContentTypesGallery
Test if the current user has the right needed by the content type to create a content.- Overrides:
hasRight
in classContentTypesGallery
- Parameters:
cType
- the content type- Returns:
- true if the user has the right needed, false otherwise.
-