<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php
require_once dirname(__FILE__) . '/List.php';

class MPSLSlidesList extends MPSLList {
    private $sliderId;

    public function __construct($id) {
        parent::__construct();
        $this->sliderId = $id;
    }

    public function getSliderId(){
        return $this->sliderId;
    }

    public function render() {
        global $mpsl_settings;
        $slides = self::getList($this->sliderId);

        if ($slides !== false) {
            include $this->pluginDir . 'views/slides.php';

        } else {
            // TODO: Throw error
            _e('Record not found', 'motopress-slider-lite');
        }
    }

    public function getOptions() {}
    public function getAttributes() {
        return array(
            'slider_id' => $this->getSliderId(),
        );
    }

    public static function getList($sliderId) {

        $db = MPSliderDB::getInstance();

        // TODO: Message
        if (!$db->isSliderExists($sliderId)) return false;

        $sli