Class PluggableComponentDefinitionBase
Base implementation of a component that can be added or removed automatically in a view.
Inheritance
Inherited Members
Namespace: EPiServer.Shell.ViewComposition
Assembly: EPiServer.Shell.dll
Version: 8.11.0Syntax
public abstract class PluggableComponentDefinitionBase : IPluggableComponentDefinition, IContainerMatcher
Constructors
PluggableComponentDefinitionBase()
Initializes a new instance of the PluggableComponentDefinitionBase class.
Declaration
protected PluggableComponentDefinitionBase()
Properties
AllowedRoles
Gets or sets the list of roles that are allowed to use this component.
Declaration
public ICollection<string> AllowedRoles { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<System.String> | The role list . |
IsAvailableForUserSelection
Gets or sets if this component should be selectable by a user when customizing a panel.
Declaration
public bool IsAvailableForUserSelection { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean | If this component should be selectable by a user when customizing a panel. |
PlugInAreas
Gets or sets the plug in areas that the component should automatically plug into.
Declaration
public IEnumerable<string> PlugInAreas { get; protected set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | The plug in areas. |
SupportsAutomaticRegistration
Gets a value indicating whether this definition can be plugged in automatically to an IContainer.
Declaration
public virtual bool SupportsAutomaticRegistration { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This should only be set to true for components that use the auto plug-in-feature for performance reasons.
Methods
CreateComponent()
Creates the component corresponding to this component definition.
Declaration
public abstract IComponent CreateComponent()
Returns
Type | Description |
---|---|
IComponent | A new instance of an IComponent. |
Remarks
This method does not perform any access control validation.
HasAccess(IPrincipal)
Determines whether the specified principal has access to this component.
Declaration
public bool HasAccess(IPrincipal principal)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Principal.IPrincipal | principal | The principal. |
Returns
Type | Description |
---|---|
System.Boolean |
|
MatchesContainer(IContainer)
Defines if the component should be added automatically to an IContainer.
Declaration
public bool MatchesContainer(IContainer container)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | The container to match. |
Returns
Type | Description |
---|---|
System.Boolean |
|