[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/components/com_fields/src/Controller/ -> DisplayController.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  com_fields
   6   *
   7   * @copyright   (C) 2017 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\Fields\Site\Controller;
  12  
  13  use Joomla\CMS\Application\CMSApplication;
  14  use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
  15  
  16  // phpcs:disable PSR1.Files.SideEffects
  17  \defined('_JEXEC') or die;
  18  // phpcs:enable PSR1.Files.SideEffects
  19  
  20  /**
  21   * Base controller class for Fields Component.
  22   *
  23   * @since  3.7.0
  24   */
  25  class DisplayController extends \Joomla\CMS\MVC\Controller\BaseController
  26  {
  27      /**
  28       * @param   array                         $config   An optional associative array of configuration settings.
  29       *                                                  Recognized key values include 'name', 'default_task', 'model_path', and
  30       *                                                  'view_path' (this list is not meant to be comprehensive).
  31       * @param   MVCFactoryInterface|null      $factory  The factory.
  32       * @param   CMSApplication|null           $app      The Application for the dispatcher
  33       * @param   \Joomla\CMS\Input\Input|null  $input    The request's input object
  34       *
  35       * @since   3.7.0
  36       */
  37      public function __construct($config = array(), MVCFactoryInterface $factory = null, $app = null, $input = null)
  38      {
  39          // Frontpage Editor Fields Button proxying.
  40          if ($input->get('view') === 'fields' && $input->get('layout') === 'modal') {
  41              // Load the backend language file.
  42              $app->getLanguage()->load('com_fields', JPATH_ADMINISTRATOR);
  43  
  44              $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
  45          }
  46  
  47          parent::__construct($config, $factory, $app, $input);
  48      }
  49  }


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