original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Loads all settings from db and triggers the event Settings . afterLoad that can be listened to by plugins to further modify the settings .