IEntityCompat extends IEntity
Interface IEntityCompat
This interface extends IEntity to provide compatibility with old style Event classes. It is only present for a transition period and will be removed in 2023 again.
Tags
Table of Contents
- getEvents() : \OCP\WorkflowEngine\IEntityEvent[]
- returns a list of supported events
- getIcon() : string
- returns the URL to the icon of the entity for display in the web interface.
- getName() : string
- returns a translated name to be presented in the web interface.
- isLegitimatedForUserId() : bool
- returns whether the provided user id is allowed to run a flow against the known context
- prepareRuleMatcher() : void
- prepareRuleMatcherCompat() : void
- Like prepareRuleMatcherCompat, but works with events that are not based on \OCP\EventDispatcher\Event.
Methods
getEvents()
returns a list of supported events
public
getEvents() : \OCP\WorkflowEngine\IEntityEvent[]
Tags
Return values
\OCP\WorkflowEngine\IEntityEvent[] —getIcon()
returns the URL to the icon of the entity for display in the web interface.
public
getIcon() : string
Usually, the implementation would utilize the imagePath()
method of the
\OCP\IURLGenerator
instance and simply return its result.
Example implementation: return $this->urlGenerator->imagePath('myApp', 'cat.svg');
Tags
Return values
string —getName()
returns a translated name to be presented in the web interface.
public
getName() : string
Example: "File" (en), "Dosiero" (eo)
Tags
Return values
string —isLegitimatedForUserId()
returns whether the provided user id is allowed to run a flow against the known context
public
isLegitimatedForUserId(string $userId) : bool
Parameters
- $userId : string
Tags
Return values
bool —prepareRuleMatcher()
public
prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, Event $event) : void
Parameters
- $ruleMatcher : IRuleMatcher
- $eventName : string
- $event : Event
Tags
prepareRuleMatcherCompat()
Like prepareRuleMatcherCompat, but works with events that are not based on \OCP\EventDispatcher\Event.
public
prepareRuleMatcherCompat(IRuleMatcher $ruleMatcher, string $eventName, mixed $event) : void
Parameters
- $ruleMatcher : IRuleMatcher
- $eventName : string
- $event : mixed