PMC-973
This commit is contained in:
30
workflow/engine/classes/Configurations.php
Normal file → Executable file
30
workflow/engine/classes/Configurations.php
Normal file → Executable 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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user