Writing extensions

IAuthenticationHook

Namespace: Lisa.Core.Domain.Authentication

A authentication hook is a plugin which can be applied to the LoginForm component and allows developers to perform certain actions after a user has authenticated.  It can also perform some validation logic before the authentication takes place, like checking if the user exists in a backend system or is a paying customer to name some examples.

IContentRenderHook

Namespace: Lisa.Core.Domain.Components

A content render hook (or a Component modifier as it's called in the Veva interface) is an "action" can be applied to components.  It can be used to alter the look and behaviour of components.  Veva includes a handful of Content render hooks that do anything from hiding components, adding padding/margins to components, applying animations to even modifying the actual content of components like adding soft hyphens in the right places.  You can create your own content render hook by implementing the IContentRenderHook interface.

IIconProvider

Namespace: ****

ILinkSource

Namespace: ****

ISelectListValueProvider

Namespace: Lisa.Core.Domain.Components

The "Checkbox list", "Radio button list" and "Select (drop-down) field" form components use the ISelectListValueProvider interface to determine which values to show to the user.  If you want to populate anyone of those form components which custom values which are generated in code or by any other means, you can implement your own ISelectListValueProvider.  The only method you need to implement is the GetValues() method which returns a dictionary of keys and values.

IComponentRenderCondition

Namespace: Lisa.Core.Domain.Components.RenderConditions

Component render conditions are used by the "Conditional panel" component to determine if the content placed inside the conditional panel should be shown or not.  The conditional panel takes in a list of IComponentRenderConditions and can be configured to be only shown when some or all applied render conditions are satisified.  There are a few implementations included in the Lisa.Modules.StandardViewComponents module, such as the AuthenticatedUserCondition which is satisified when a user is authenticated (any or a specific user), the DataBindingContextValueCondition which is satisfied when a certain field in the DataBindingContext has a specific value and the IsCurrentPageRenderCondition which is satisfied if the user is on a certain page.

IChartDataSource

Namespace: Lisa.Core.Domain.Components

A chart datasource is used to supply data to the charting components such as the ones in the Lisa.Modules.ChartJS module.

IEventSubscriber

Namespace: ****

IContentResolver

Namespace: Lisa.Core.Domain.Interfaces

Users can paste content into the search-field which is at the top of the Add Content dialog when they are adding content to pages in Veva.

When users paste data into that field, Veva passes that data through all registered content resolvers to determine if the pasted content can be recognized as a certain type of content, and if so, which components should be suggested for the user.

For example, if you paste a generic URL into the field, Veva will recognize it's a URL and will suggest the Link component.  Furthermore, if the URL is a certain type of URL, such as a Youtube video URL, Veva will also recognize that and in addition to suggesting the Link component, the user will be given the option to insert the Youtube component and the video ID will be extracted from the URL and the component will be configured to show that video.

This functionality is implemented using content resolvers.  Each content resolver needs to be able to tell if it supports the pasted data, which is the CanResolve() method and if it returns true, the GetContentMeta() method will be called which returns a ContentResolverResult which tells Veva which component(s) to insert and with which property values, among other things.

If you have a specific scenario where if users paste a certain type of content into the search field and you want a specific component to be suggested, you can implement your own content resolver.