CoreFiles by mySites.guru
helper.php47 lines, 1,071 bytes, from Joomla_4.0.0-alpha10-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha9
md5
adf1e62a3aa3c76886f235b50cb742ba
sha1
27e2e4ace9a60bc15864e3a9e3bb87f5aaa79ce6
sha256
772f6eca5b2b5c1c2b56c1567556176ab7e51735b50b2c51fd6c7607feb96595
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_privacy_dashboard
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\Component\Privacy\Administrator\Model\DashboardModel;
use Joomla\Database\Exception\ExecutionFailureException;

/**
 * Helper class for admin privacy dashboard module
 *
 * @since  3.9.0
 */
class ModPrivacyDashboardHelper
{
	/**
	 * Method to retrieve information about the site privacy requests
	 *
	 * @return  array  Array containing site privacy requests
	 *
	 * @since   3.9.0
	 */
	public static function getData()
	{
		/** @var DashboardModel $model */
		$model = Factory::getApplication()
			->bootComponent('com_privacy')
			->getMVCFactory()
			->createModel('Dashboard', 'Administrator', ['ignore_request' => true]);

		try
		{
			return $model->getRequestCounts();
		}
		catch (ExecutionFailureException $e)
		{
			return [];
		}
	}
}

The same content is in 3 releases, Joomla 4.0.0-alpha8 to 4.0.0-alpha10. See them all, or every version of this file.