HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/apklausos/tests/data/plugins/SettingsPlugin.php
<?php

class SettingsPlugin extends PluginBase
{
    protected static $description = 'Dummy plugin for testing SettingsPlugin event';
    protected static $name = 'SettingsPlugin';
    protected $storage = 'DbStorage';
    protected $encryptedSettings = [];
    /* @inheritdoc */
    protected $settings = [];

    /**
     * Set the settings, used to test some settings
     * @param array[]
     * @return void
     */
    public function setSettings($settings)
    {
        $this->settings = $settings;
    }

    public function init()
    {
    }

    public function setSetting($name, $value)
    {
        return $this->set($name, $value);
    }

    public function getSetting($name)
    {
        return $this->get($name);
    }

    public function setEncryptedSettings($encryptedSettings)
    {
        $this->encryptedSettings = $encryptedSettings;
    }

    public function setSurveySetting($name, $value, $surveyId)
    {
        return $this->set($name, $value, 'Survey', $surveyId);
    }

    public function getSurveySetting($name, $surveyId)
    {
        return $this->get($name, 'Survey', $surveyId);
    }
}