/** * Saves (persists) the current setting values in the database. */ public function save() { $this->storage->save(); SettingsStorage::clearCache(); /** * Triggered after a plugin settings have been updated. * * **Example** * * Piwik::addAction('Settings.MyPlugin.settingsUpdated', function (Settings $settings) { * $value = $settings->someSetting->getValue(); * // Do something with the new setting value * }); * * @param Settings $settings The plugin settings object. */ Piwik::postEvent(sprintf('Settings.%s.settingsUpdated', $this->pluginName), array($this)); }