<?php
namespace EIS\Component\EIS\Administrator\View\Config;

\defined('_JEXEC') or die;

use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Factory;

class HtmlView extends BaseHtmlView
{
    protected $form;
    protected $item;

    public function display($tpl = null): void
    {
        $db = Factory::getDbo();
        $query = $db->getQuery(true)
            ->select('*')
            ->from($db->quoteName('#__eis_settings'))
            ->setLimit(1);

        $db->setQuery($query);
        $this->item = $db->loadAssoc();

        parent::display($tpl);
    }

    public function getItem()
    {
        return $this->item;
    }
}
