Skip to content

Commit

Permalink
Namespace HTML helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Apr 14, 2019
1 parent 0f11de2 commit 6adbb80
Showing 1 changed file with 10 additions and 6 deletions.
Expand Up @@ -7,14 +7,18 @@
* @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 PrivacyHtmlHelper
class Privacy
{
/**
* Render a status label
Expand All @@ -25,22 +29,22 @@ class PrivacyHtmlHelper
*
* @since 3.9.0
*/
public static function statusLabel($status)
public function statusLabel($status)
{
switch ($status)
{
case 2:
return '<span class="label label-success">' . JText::_('COM_PRIVACY_STATUS_COMPLETED') . '</span>';
return '<span class="label label-success">' . Text::_('COM_PRIVACY_STATUS_COMPLETED') . '</span>';

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

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

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

0 comments on commit 6adbb80

Please sign in to comment.