How to access dashlet configuration variables from the server?

When you click the "gear" icon in the top right corner of a dashlet, there are config items users can set for each of their dashlets. I'd like to be able to access those dashlet configuration values from my server code. 

Is there a class I can use to access this data? Anyone have an example for how to get to this data?

Does it use the UserPreferences module?

$GLOBALS['current_user']->setPreference(...)
$GLOBALS['current_user']->getPreference(...)
  • The settings are managed per dashboard per dashlet. So you should if you know which dashboard to look, be able to retrieve the data that way. If the dashlet is a custom dashlet you could add an ajax call to your own api when the save button in the config is clicked to send the current user and the settings they have. 

    What is the exact usecase you are trying to solve?