BackendUser::getSettings()
\nn\t3::BackendUser()->getSettings($moduleName = 'nnhelpers', $path = NULL);
Retrieves user-specific settings for the currently logged in backend user.
See \nn\t3::BackendUser()->updateSettings() to save the data.
\nn\t3::BackendUser()->getSettings('myext'); // => ['wants'=>['drink'=>'coffee']]
\nn\t3::BackendUser()->getSettings('myext', 'wants'); // => ['drink'=>'coffee']
\nn\t3::BackendUser()->getSettings('myext', 'wants.drink'); // => 'coffee'
Copied!
| @return mixed
Source Code
public function getSettings( $moduleName = 'nnhelpers', $path = null )
{
$data = $this->get()->uc[$moduleName] ?? [];
if (!$path) return $data;
return \nn\t3::Settings()->getFromPath( $path, $data );
}
Copied!