[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_admin/src/View/Help/ -> HtmlView.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_admin
   6   *
   7   * @copyright   (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  namespace Joomla\Component\Admin\Administrator\View\Help;
  12  
  13  use Exception;
  14  use Joomla\CMS\Language\Text;
  15  use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
  16  use Joomla\CMS\Toolbar\ToolbarHelper;
  17  use Joomla\Component\Admin\Administrator\Model\HelpModel;
  18  
  19  // phpcs:disable PSR1.Files.SideEffects
  20  \defined('_JEXEC') or die;
  21  // phpcs:enable PSR1.Files.SideEffects
  22  
  23  /**
  24   * HTML View class for the Admin component
  25   *
  26   * @since  1.6
  27   */
  28  class HtmlView extends BaseHtmlView
  29  {
  30      /**
  31       * The search string
  32       *
  33       * @var    string
  34       * @since  1.6
  35       */
  36      protected $helpSearch = null;
  37  
  38      /**
  39       * The page to be viewed
  40       *
  41       * @var    string
  42       * @since  1.6
  43       */
  44      protected $page = null;
  45  
  46      /**
  47       * The iso language tag
  48       *
  49       * @var    string
  50       * @since  1.6
  51       */
  52      protected $languageTag = null;
  53  
  54      /**
  55       * Table of contents
  56       *
  57       * @var    array
  58       * @since  1.6
  59       */
  60      protected $toc = [];
  61  
  62      /**
  63       * Execute and display a template script.
  64       *
  65       * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  66       *
  67       * @return  void
  68       *
  69       * @since   1.6
  70       *
  71       * @throws  Exception
  72       */
  73      public function display($tpl = null): void
  74      {
  75          /** @var HelpModel $model */
  76          $model                    = $this->getModel();
  77          $this->helpSearch         = $model->getHelpSearch();
  78          $this->page               = $model->getPage();
  79          $this->toc                = $model->getToc();
  80          $this->languageTag        = $model->getLangTag();
  81  
  82          $this->addToolbar();
  83  
  84          parent::display($tpl);
  85      }
  86  
  87      /**
  88       * Setup the Toolbar
  89       *
  90       * @return  void
  91       *
  92       * @since   1.6
  93       */
  94      protected function addToolbar(): void
  95      {
  96          ToolbarHelper::title(Text::_('COM_ADMIN_HELP'), 'support help_header');
  97      }
  98  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer