HOR-3509 add description in functions

This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-08-09 14:59:22 -04:00
parent 810eeb0c2d
commit 0708f640cd

View File

@@ -213,6 +213,15 @@ class ConsolidatedCases
return $oReportTable->getRepTabUid();
}
/**
* Create a record to 'ReportVar', this function uses the fields generated by
* the function 'buildReportVariables'.
*
* @param string $repTabUid
* @param string $proUid
* @param array $formFields
* @return array
*/
public function createReportVariables($repTabUid, $proUid, $formFields)
{
list($fieldsClass, $fields) = $this->buildReportVariables($formFields, function ($repVarName, $repVarType) use ($repTabUid, $proUid) {
@@ -228,6 +237,14 @@ class ConsolidatedCases
return array($fieldsClass, $fields);
}
/**
* Generates the fields for 'Report Tables', the second parameter is a 'callback'
* that receives as arguments the name and type of the field.
*
* @param array $formFields
* @param function $callbackFunction
* @return array
*/
public function buildReportVariables($formFields, $callbackFunction = null)
{
$fieldsClass = array();