CoreFiles by mySites.guru
HtmlView.php84 lines, 1,732 bytes, from Joomla_5.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha4
md5
1db2898c68c626457c97e50fd28c614f
sha1
2eda7c8f336141379e849a303ada05d7212de905
sha256
4709e58972d777d23d1eb84c02b95852f834544e376a95c7696a1d068368637b
<?php

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

namespace Joomla\Component\Finder\Administrator\View\Item;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;

/**
 * Index view class for Finder.
 *
 * @since  5.0.0
 */
class HtmlView extends BaseHtmlView
{
    /**
     * The indexed item
     *
     * @var  object
     *
     * @since  5.0.0
     */
    protected $item;

    /**
     * The associated terms
     *
     * @var  object[]
     *
     * @since  5.0.0
     */
    protected $terms;

    /**
     * The associated taxonomies
     *
     * @var  object[]
     *
     * @since  5.0.0
     */
    protected $taxonomies;

    /**
     * Method to display the view.
     *
     * @param   string  $tpl  A template file to load. [optional]
     *
     * @return  void
     *
     * @since   5.0.0
     */
    public function display($tpl = null)
    {
        $this->item       = $this->get('Item');
        $this->terms      = $this->get('Terms');
        $this->taxonomies = $this->get('Taxonomies');

        // Configure the toolbar.
        $this->addToolbar();

        parent::display($tpl);
    }

    /**
     * Method to configure the toolbar for this view.
     *
     * @return  void
     *
     * @since   5.0.0
     */
    protected function addToolbar()
    {
        ToolbarHelper::title(Text::_('COM_FINDER_INDEX_TOOLBAR_TITLE'), 'search-plus finder');
        ToolbarHelper::back('JTOOLBAR_BACK', 'index.php?option=com_finder&view=index');
    }
}

The same content is in 3 releases, Joomla 5.0.0-alpha1 to 5.0.0-alpha3. See them all, or every version of this file.