Entity Actions perform an action on a specific item
This page is a work in progress. It will be updated as the software evolves.
Previously known as Property Actions, Entity Actions is a feature that provides a generic place for secondary or additional functionality for an entity type. An entity type can be a media, document and so on.
Entity Actions in the UI
Sidebar Context Menu
Sidebar Context Menu is an entity action that can be performed on a menu item. For example in the content section you can perform some extra actions on the content such as sorting, moving, etc.
Registering an Entity Action
TODO: can we show the typescript interface for the manifest?
// TODO: get interfaceinterfaceUmbEntityActionElement {}
The Entity Action Class
As part of the Extension Manifest you can attach a class that will be instanciated as part of the action. It will have access to the host element, a repository with the given alias and the unique (key etc) of the entity.
The class either provides a getHref method, or an execute method. If the getHref method is provided, the action will use the link. Otherwise the execute method will be used. When the action is clicked the execute method on the api class will be run. When the action is completed, an event on the host element will be dispatched to notify any surrounding elements.
We currently have a couple of generic actions that can be used across silos, so we don't have to write the same logic again: copy, move, trash, delete, etc. We can add more as we discover the needs.