protected function _loadSettings()
    {
        $settings = Cache::remember('settings', function () {
            /** @var SettingsTable $Settings */
            $Settings = $this->loadModel('Wasabi/Core.Settings');
            return $Settings->getAllKeyValues();
        }, 'wasabi/core/longterm');

        $event = new Event('Settings.afterLoad', $settings);
        $this->eventManager()->dispatch($event);

        if ($event->result !== null) {
            $settings = $event->result;
        }

        Configure::write('Settings', $settings);
    }
protected function _loadSettings()
    {
        $settings = Cache::remember('settings', function () {
            /** @var SettingsTable $Settings */
            $Settings = $this->loadModel('Wasabi/Core.Settings');
            return $Settings->getAllKeyValues();
        }, 'wasabi/core/longterm');

        $event = new Event('Settings.afterLoad', $settings);
        $this->eventManager()->dispatch($event);

        if ($event->result !== null) {
            $settings = $event->result;
        }

        Configure::write('Settings', $settings);
    }
protected function _loadSettings ( ) { $ settings = Cache :: remember ( 'settings' , function ( ) { /** @var SettingsTable $Settings */ $ Settings = $ this -> loadModel ( 'Wasabi/Core.Settings' ) ; return $ Settings -> getAllKeyValues ( ) ; } , 'wasabi/core/longterm' ) ; $ event = new Event ( 'Settings.afterLoad' , $ settings ) ; $ this -> eventManager ( ) -> dispatch ( $ event ) ; if ( $ event -> result !== null ) { $ settings = $ event -> result ; } Configure :: write ( 'Settings' , $ settings ) ; }
Loads all settings from db and triggers the event 'Settings.afterLoad'
that can be listened to by plugins to further modify the settings.

Structure:
----------
Array(
'PluginName|ScopeName' => Array(
'key1' => 'value1',
...
),
...
)

Access via:
-----------
Configure::read('Settings.ScopeName.key1');

@return array
Loads all settings from db and triggers the event Settings . afterLoad that can be listened to by plugins to further modify the settings .