[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/modules/mod_sampledata/src/Helper/ -> SampledataHelper.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  mod_sampledata
   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\Module\Sampledata\Administrator\Helper;
  12  
  13  use Joomla\CMS\Event\AbstractEvent;
  14  use Joomla\CMS\Factory;
  15  use Joomla\CMS\Plugin\PluginHelper;
  16  
  17  // phpcs:disable PSR1.Files.SideEffects
  18  \defined('_JEXEC') or die;
  19  // phpcs:enable PSR1.Files.SideEffects
  20  
  21  /**
  22   * Helper for mod_sampledata
  23   *
  24   * @since  3.8.0
  25   */
  26  abstract class SampledataHelper
  27  {
  28      /**
  29       * Get a list of sampledata.
  30       *
  31       * @return  mixed  An array of sampledata, or false on error.
  32       *
  33       * @since  3.8.0
  34       */
  35      public static function getList()
  36      {
  37          PluginHelper::importPlugin('sampledata');
  38  
  39          return Factory::getApplication()
  40              ->getDispatcher()
  41              ->dispatch(
  42                  'onSampledataGetOverview',
  43                  AbstractEvent::create(
  44                      'onSampledataGetOverview',
  45                      [
  46                          'subject'   => new \stdClass(),
  47                      ]
  48                  )
  49              )
  50              ->getArgument('result') ?? [];
  51      }
  52  }


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