adds a trigger hint for complex operations

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2019-08-29 12:36:35 +02:00
parent 54bdc95cc1
commit f0f0a7b43e
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
2 changed files with 16 additions and 2 deletions

View File

@ -152,6 +152,7 @@ abstract class ASettings implements ISettings {
'description' => $operator->getDescription(),
'fixedEntity' => $operator instanceof ISpecificOperation ? $operator->getEntityId() : '',
'isComplex' => $operator instanceof IComplexOperation,
'triggerHint' => $operator instanceof IComplexOperation ? $operator->getTriggerHint() : '',
];
}, $operators);
}

View File

@ -38,6 +38,19 @@ namespace OCP\WorkflowEngine;
*
* @package OCP\WorkflowEngine
*
* @sincee 18.0.0
* @since 18.0.0
*/
interface IComplexOperation extends IOperation { }
interface IComplexOperation extends IOperation {
/**
* As IComplexOperation chooses the triggering events itself, a hint has
* to be shown to the user so make clear when this operation is becoming
* active. This method returns such a translated string.
*
* Example: "When a file is accessed" (en)
*
* @since 18.0.0
*/
public function getTriggerHint(): string;
}