CoreFiles by mySites.guru
helper.php42 lines, 933 bytes, from Joomla_3.9.13-Stable-Full_Package.zip
Raw History Compare with 3.9.12
md5
dc5a5c7a1a1dbe92c73db731272a54f0
sha1
b8994521b66a0f0b1343489a6d5c69c4c0e73519
sha256
b25ba22f2348e693be4fb7b41bb9ab82c1a76c5441821af5b2bfe71a9f91cf86
<?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;

/**
 * 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 26 releases, Joomla 3.9.2-rc to 3.9.14. See them all, or every version of this file.