CoreFiles by mySites.guru
helper.php42 lines, 933 bytes, from Joomla_3.9.21-Stable-Full_Package.zip
Raw History Compare with 3.9.20
md5
6c2e3843ed990a3cbfdf9f5fa982a1dc
sha1
b1711c4ed2b9791b5b29951405e56c279756718a
sha256
cf16a53ef79c4c3d03123aa22f17c444a98ee9eb2a8facbe5352edd64468410d
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_privacy_dashboard
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * 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()
	{
		JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_privacy/models', 'PrivacyModel');

		/** @var PrivacyModelDashboard $model */
		$model = JModelLegacy::getInstance('Dashboard', 'PrivacyModel');

		try
		{
			return $model->getRequestCounts();
		}
		catch (JDatabaseException $e)
		{
			return array();
		}
	}
}

The same content is in 30 releases, Joomla 3.9.15-rc to 3.10.0-alpha1. See them all, or every version of this file.