CoreFiles by mySites.guru
Privacy.php50 lines, 1,122 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
c40d48d932d089ac25ce266dbaec4878
sha1
0bbc7813218d27064740c7e987d51c928bd8099d
sha256
e08024338839ab3c320cfcb63e430edf396b6bea02b9cf3ca2e2c9c9e2fa3a40
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_privacy
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Privacy\Administrator\Service\HTML;

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

/**
 * Privacy component HTML helper.
 *
 * @since  3.9.0
 */
class Privacy
{
	/**
	 * Render a status badge
	 *
	 * @param   integer  $status  The item status
	 *
	 * @return  string
	 *
	 * @since   3.9.0
	 */
	public function statusLabel($status)
	{
		switch ($status)
		{
			case 2:
				return '<span class="badge badge-success">' . Text::_('COM_PRIVACY_STATUS_COMPLETED') . '</span>';

			case 1:
				return '<span class="badge badge-info">' . Text::_('COM_PRIVACY_STATUS_CONFIRMED') . '</span>';

			case -1:
				return '<span class="badge badge-danger">' . Text::_('COM_PRIVACY_STATUS_INVALID') . '</span>';

			default:
			case 0:
				return '<span class="badge badge-warning">' . Text::_('COM_PRIVACY_STATUS_PENDING') . '</span>';
		}
	}
}

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