This commit is contained in:
Paula Quispe
2019-07-17 09:54:51 -04:00
parent 44cb9966eb
commit c22891dc7e
9 changed files with 461 additions and 190 deletions

30
workflow/engine/classes/Configurations.php Normal file → Executable file
View File

@@ -612,6 +612,36 @@ class Configurations // extends Configuration
}
}
/**
* Get the values stored in the USER_PREFERENCES
*
* @param string $key
* @param string $userUid
* @param string $listName
*
* @return array
*/
public function getUserPreferences($key = null, $userUid = null, $listName = 'advanced')
{
$this->loadConfig($obj, 'USER_PREFERENCES', '', '', $userUid, '');
if (isset($key)) {
if (isset($this->aConfig[$key])) {
if (isset($data) && is_array($data)) {
foreach ($data as $k => $v) {
$this->aConfig[$key] = str_replace('@' . $k, $v, $this->aConfig[$key]);
}
}
return $this->aConfig[$key];
} else {
return [$listName => []];
}
} else {
return $this->aConfig;
}
}
/**
* Gets the default fields and configuration for the cases list
*