Nextcloud PHP API (stable18)

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
since
18.0.0
deprecated

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
since
18.0.0
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
since
18.0.0
Return values
string

getName()

returns a translated name to be presented in the web interface.

public getName() : string

Example: "File" (en), "Dosiero" (eo)

Tags
since
18.0.0
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
since
18.0.0
Return values
bool

prepareRuleMatcher()

public prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, Event $event) : void
Parameters
$ruleMatcher : IRuleMatcher
$eventName : string
$event : Event
Tags
since
18.0.0

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
Tags
since
18.0.0
deprecated

Search results