[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Document/Renderer/Html/ -> HeadRenderer.php (source)

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   8   */
   9  
  10  namespace Joomla\CMS\Document\Renderer\Html;
  11  
  12  use Joomla\CMS\Document\DocumentRenderer;
  13  
  14  // phpcs:disable PSR1.Files.SideEffects
  15  \defined('JPATH_PLATFORM') or die;
  16  // phpcs:enable PSR1.Files.SideEffects
  17  
  18  /**
  19   * HTML document renderer for the document `<head>` element
  20   *
  21   * @since  3.5
  22   */
  23  class HeadRenderer extends DocumentRenderer
  24  {
  25      /**
  26       * Renders the document head and returns the results as a string
  27       *
  28       * @param   string  $head     (unused)
  29       * @param   array   $params   Associative array of values
  30       * @param   string  $content  The script
  31       *
  32       * @return  string  The output of the script
  33       *
  34       * @since   3.5
  35       */
  36      public function render($head, $params = array(), $content = null)
  37      {
  38          $buffer  = '';
  39          $buffer .= $this->_doc->loadRenderer('metas')->render($head, $params, $content);
  40          $buffer .= $this->_doc->loadRenderer('styles')->render($head, $params, $content);
  41          $buffer .= $this->_doc->loadRenderer('scripts')->render($head, $params, $content);
  42  
  43          return $buffer;
  44      }
  45  }


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