CoreFiles by mySites.guru
HtmlView.php61 lines, 1,453 bytes, from Joomla_5.4.0-beta1-Beta-Full_Package.zip
Raw History Compare with 5.3.0-beta3
md5
d095a3be3f8248b0790b43ce7bc4df07
sha1
8348fee103987968b9aaa0dcd67e5869bf6c6e0a
sha256
7e3f0eaf8e6897c12e76a441aa0cdffdc16ce25d91c2854ab8368c311b32cea5
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Banners\Administrator\View\Download;

use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Banners\Administrator\Model\DownloadModel;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * View class for download a list of tracks.
 *
 * @since  1.6
 */
class HtmlView extends BaseHtmlView
{
    /**
     * The Form object
     *
     * @var    Form
     * @since  1.6
     */
    protected $form;

    /**
     * Display the view
     *
     * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
     *
     * @return  void
     *
     * @since   1.6
     *
     * @throws  \Exception
     */
    public function display($tpl = null): void
    {
        /** @var DownloadModel $model */
        $model      = $this->getModel();
        $this->form = $model->getForm();

        // Check for errors.
        if (\count($errors = $model->getErrors())) {
            throw new GenericDataException(implode("\n", $errors), 500);
        }

        parent::display($tpl);
    }
}

The same content is in 26 releases, Joomla 5.3.0-alpha1 to 6.0.0-beta1. See them all, or every version of this file.