Skip to main content

Transitions Manager

You can change the selection options for the picklists managed by the transitions manager, as well as add messages to the "State manager" block to the right of the record detail. To register this functionality use the method:

SDK::setTransition($module, $fieldname, $file, $function);

$module : the name of the module to handle
$fieldname : the name of the field managed by transition
$file : the path of the php file that contains the function to call
$function : the function to call

To remove the customization:

SDK::unsetTransition($module, $fieldname);

The function called by the transitions manager has the following format:

<?php

function myFunction($module, $fieldname, $record, $status, $values) {
	// Your code ...
}

$module : the current module
$fieldname : the name of the field managed by transition
$record : the current record
$status : the value of the field managed by transition of the current record
$values : array of admissible values for the status

It must return null if you do not want to change the transitions manager behavior or an array with the following format:

array(
'values' => array(..) // array of admissible values for the status
'message' => '' // html code to be included under the transitions manager block
);

Hooks
modules/Transitions/Transitions.php
modules/Transitions/Statusblock.php
Smarty/templates/modules/Transitions/StatusBlock.tpl