Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
ConstraintViolationViewer.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\contents\validation\validators
;
4
5
class
ConstraintViolationViewer
{
6
const
SEVERITY_ICONS
=[
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
Ubiquity\contents\validation\validators\ConstraintViolationViewer
Definition
ConstraintViolationViewer.php:5
Ubiquity\contents\validation\validators\ConstraintViolationViewer\getValue
static getValue($severity)
Definition
ConstraintViolationViewer.php:13
Ubiquity\contents\validation\validators\ConstraintViolationViewer\getIcon
static getIcon($severity)
Definition
ConstraintViolationViewer.php:19
Ubiquity\contents\validation\validators\ConstraintViolationViewer\SEVERITY_ICONS
const SEVERITY_ICONS
Definition
ConstraintViolationViewer.php:6
Ubiquity\contents\validation\validators\ConstraintViolationViewer\getType
static getType($severity)
Definition
ConstraintViolationViewer.php:23
Ubiquity\contents\validation\validators
Validators definition.
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity
src
Ubiquity
contents
validation
validators
ConstraintViolationViewer.php
Generated on Sun Dec 10 2023 15:04:15 for
Ubiquity
by
doxygen
1.9.8