Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
ConstraintViolationViewer.php
Go to the documentation of this file.
1<?php
2
4
7 'default'=>['icon'=>'thumbtack','type'=>''],
8 'info'=>['icon'=>'info circle','type'=>'info'],
9 'warning'=>['icon'=>'exclamation circle','type'=>'warning'],
10 'error'=>['icon'=>'exclamation triangle','type'=>'error']
11 ];
12
13 private static function getValue($severity){
14 if(isset($severity) && isset(self::SEVERITY_ICONS[$severity])){
15 return self::SEVERITY_ICONS[$severity];
16 }
17 return self::SEVERITY_ICONS['default'];
18 }
19 public static function getIcon($severity){
20 return self::getValue($severity)['icon'];
21 }
22
23 public static function getType($severity){
24 return self::getValue($severity)['type'];
25 }
26}
27