PMCORE-1420
This commit is contained in:
committed by
Fabio Guachalla
parent
ba43807f49
commit
8d9628f905
@@ -26,6 +26,16 @@ class Variable
|
||||
'object' => 10
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the variables types accepted
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getVariableTypes()
|
||||
{
|
||||
return $this->variableTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Variable for a Process
|
||||
*
|
||||
@@ -355,6 +365,34 @@ class Variable
|
||||
return $arrayVariables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data of Variables related to the specific type
|
||||
*
|
||||
* @param string $processUid Unique id of Process
|
||||
* @param int $typeVarId
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $search
|
||||
* @param string $prefix
|
||||
*
|
||||
* @return array, return an array with data of a DynaForm
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getVariablesByType($processUid, $typeVarId = 0, $start = null, $limit = null, $search = null, $prefix = null)
|
||||
{
|
||||
//Verify data
|
||||
$proId = Validator::proUid($processUid, '$prj_uid');
|
||||
$variables = ProcessVariables::getVariablesByType($proId, $typeVarId, $start, $limit, $search);
|
||||
$arrayVariables = [];
|
||||
foreach ($variables as $var) {
|
||||
$arrayVariables[] = [
|
||||
'value' => is_null($prefix) ? $var['VAR_NAME'] : $prefix . $var['VAR_NAME'],
|
||||
];
|
||||
}
|
||||
|
||||
return $arrayVariables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify field definition
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user