CoreFiles by mySites.guru
helper.php42 lines, 933 bytes, from Joomla_3.9.0-Stable-Full_Package.zip
Raw History Compare with 3.8.13
md5
5aa03425419f3827e784c201c4426772
sha1
0248f3dbc66179ecb377419c046f41338502a9f7
sha256
76c92f7fbea50629d2b78cfc3018be777698e125455d47f87e100c19acada643
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_privacy_dashboard
 *
 * @copyright   Copyright (C) 2005 - 2018 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 10 releases, Joomla 3.9.0-alpha to 3.9.1. See them all, or every version of this file.