Please enable JavaScript to view this site.

The manual for the JobRouter developer

Navigation: System activities > Description of the PHP API for system activities

Implementation

Scroll Prev Top Next More

Obligatory methods

You need to implement the following methods yourself in order for the system activities to work correctly.

Signature

Description

string getActivityName()

Returns the name of the system activity displayed in the overview of all existing system activities

string getActivityDescription()

Returns the description of the system activity displayed in the overview of all existing system activities

string getDialogXml()

Returns the XML configuration as string

Optional methods

You can choose to implement the following methods in order to modify a specific default functionality.

Signature

Description

string getActivityId()

Returns the unique ID of the system activity (optional)

string getStatusText()

Returns the current status of the system activity as text (optional)

array getUDL(

    string $udl,

    string $elementID

)

Returns a two-dimensional array based on $udl and $elementID to enable a selection instead of a text field during the assignment of configuration lists.
 

$udl contains the udl attribute of the list from the XML configuration

$elementID contains the id attribute of the list from the XML configuration
 

Example:
 

public function getUDL($udl, $elementID)

{

 if ($elementID == 'fieldList1') {

         return [

                 ['name' => '-', 'value' => ''],

                 ['name' => 'Option 1', 'value' => '1'],

                 ['name' => 'Option 2', 'value' => '2'],

                 ['name' => 'Option 3', 'value' => '3']

         ];

 }

 

 if ($elementID == 'fieldList2') {

         return [

                 ['name' => '-', 'value' => ''],

                 ['name' => 'Option 1', 'value' => '1'],

                 ['name' => 'Option 2', 'value' => '2'],

                 ['name' => 'Option 3', 'value' => '3']

         ];

 }

 

 return null;

}