Commit ee586ecd authored by jaapjansma's avatar jaapjansma

added gethelptext method

parent cd87246a
......@@ -4,6 +4,7 @@ Version 1.3
*Major Changes*
* Added batch processing of actions. Also added the start and finish of a batch to the action provider class.
* Added a `getHelpText` method for retrieving a a help text for each action
*Changed actions*
......
......@@ -242,6 +242,18 @@ abstract class AbstractAction implements \JsonSerializable {
}
}
}
/**
* Returns a help text for this action.
*
* The help text is shown to the administrator who is configuring the action.
* Override this function in a child class if your action has a help text.
*
* @return string|false
*/
public function getHelpText() {
return false;
}
/**
* Creates a parameterBag object.
......@@ -261,6 +273,7 @@ abstract class AbstractAction implements \JsonSerializable {
$return['parameter_spec'] = $this->getParameterSpecification()->toArray();
$return['configuration_spec'] = $this->getConfigurationSpecification()->toArray();
$return['output_spec'] = $this->getOutputSpecification()->toArray();
$return['help_text'] = $this->getHelpText();
$return['default_configuration'] = null;
if ($this->getDefaultConfiguration()) {
$return['default_configuration'] = $this->getDefaultConfiguration()->toArray();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment