CoreFiles by mySites.guru
SampledataHelper.php49 lines, 985 bytes, from Joomla_4.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta1
md5
b8c078b028115ce868b8146a01045207
sha1
4cbda4417e5b7fa32e063a024d3a524b6d70ce1f
sha256
ebe2a65ebd4b8ed2f95fcaecbd981bb9d91a6e2225a3e78aaff8a40b7a34c8d5
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_sampledata
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Module\Sampledata\Administrator\Helper;

\defined('_JEXEC') or die;

use Joomla\CMS\Event\AbstractEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;

/**
 * Helper for mod_sampledata
 *
 * @since  3.8.0
 */
abstract class SampledataHelper
{
	/**
	 * Get a list of sampledata.
	 *
	 * @return  mixed  An array of sampledata, or false on error.
	 *
	 * @since  3.8.0
	 */
	public static function getList()
	{
		PluginHelper::importPlugin('sampledata');

		return Factory::getApplication()
			->getDispatcher()
			->dispatch(
				'onSampledataGetOverview',
				AbstractEvent::create(
					'onSampledataGetOverview',
					[
						'subject'	=> new \stdClass,
					]
				)
			)
			->getArgument('result') ?? [];
	}
}

The same content is in 49 releases, Joomla 4.0.0-rc1 to 4.2.0-beta2. See them all, or every version of this file.