Skip to content

Common Subplugin Features

Thomas Niedermaier edited this page Mar 24, 2026 · 3 revisions

There are multiple functions that are available within the API for both trigger and steps.

Common Features Trigger & Steps

Subplugin Instance Settings

To define values and features at step or trigger instance level.

get_icon() in lib.php

Define an icon for your step or trigger. They are taken from the pool of font awesome icons in Moodle.

Code example:

/**
 * Returns the string of the specific icon for this trigger.
 * @return string icon string
 */
public function get_icon() {
    return 't/copy';
}

Trigger (only) Features

multiple_use() in lib.php

/**
 * Specifies if this trigger can be used more than once in a single workflow.
 * @return bool
 */
public function multiple_use() {
    return true;
}

Step (only) Features

is_stoppable() in lib.php

With this feature activated for your step you can stop the workflow for courses that have reached this step instance without deactivating the whole workflow.

/**
 * Returns if this step type is stoppable.
 * @return bool
 */
public function is_stoppable() {
    return false;
}

Clone this wiki locally