Skip to content

Commit

Permalink
Usenamespaced classes for system
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Lodder committed Jan 2, 2018
1 parent e3897f7 commit ec75775
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions layouts/joomla/system/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;

$msgList = $displayData['msgList'];

$alert = [
JApplicationCms::MSG_EMERGENCY => 'danger',
JApplicationCms::MSG_ALERT => 'danger',
JApplicationCms::MSG_CRITICAL => 'danger',
JApplicationCms::MSG_ERROR => 'danger',
JApplicationCms::MSG_WARNING => 'warning',
JApplicationCms::MSG_NOTICE => 'info',
JApplicationCms::MSG_INFO => 'info',
JApplicationCms::MSG_DEBUG => 'info',
CMSApplication::MSG_EMERGENCY => 'danger',
CMSApplication::MSG_ALERT => 'danger',
CMSApplication::MSG_CRITICAL => 'danger',
CMSApplication::MSG_ERROR => 'danger',
CMSApplication::MSG_WARNING => 'warning',
CMSApplication::MSG_NOTICE => 'info',
CMSApplication::MSG_INFO => 'info',
CMSApplication::MSG_DEBUG => 'info',
];

?>
Expand All @@ -29,7 +32,7 @@
<?php foreach ($msgList as $type => $msgs) : ?>
<joomla-alert level="<?php echo $alert[$type] ?? $type; ?>" dismiss="true">
<?php if (!empty($msgs)) : ?>
<h4><?php echo JText::_($type); ?></h4>
<h4><?php echo Text::_($type); ?></h4>
<div>
<?php foreach ($msgs as $msg) : ?>
<div><?php echo $msg; ?></div>
Expand All @@ -40,4 +43,4 @@
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>

0 comments on commit ec75775

Please sign in to comment.