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/application/libraries/PluginManager/EmailPluginBase.php
<?php

namespace LimeSurvey\PluginManager;

use LimeMailer;
use LimeSurvey\Datavalueobjects\EmailPluginInfo;

abstract class EmailPluginBase extends PluginBase
{
    /**
     * Returns the plugin's display name
     * @return string
     */
    abstract protected function getDisplayName();

    /**
     * Returns true if the plugin is the currently selected email plugin
     * @return bool
     */
    protected function isCurrentEmailPlugin()
    {
        if (LimeMailer::MethodPlugin !== \Yii::app()->getConfig('emailmethod')) {
            return false;
        }
        return get_class($this) == \Yii::app()->getConfig('emailplugin');
    }

    /**
     * Returns the plugin's metadata
     * @return EmailPluginInfo
     */
    protected function getEmailPluginInfo()
    {
        return new EmailPluginInfo($this->getId(), $this->getDisplayName(), get_class($this));
    }
}