| Server IP : 37.9.174.138 / Your IP : 216.73.216.117 Web Server : Apache System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64 User : ftpuser ( 1001) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/ttjs.cz/dev/app/constants/ |
Upload File : |
<?php
namespace app\constants;
class UserType {
CONST ADMIN = "ADMIN";
CONST OPERATOR = "OPERATOR";
CONST ENGINEER = "ENGINEER";
private static $messages = array(
self::ENGINEER => "Partner",
self::OPERATOR => "Zamestnanec",
self::ADMIN => "Administrátor",
);
private static $labels = array(
self::ADMIN => "danger",
self::OPERATOR => "primary",
self::ENGINEER => "default",
);
static function getConstants($exclude = array()) {
$oClass = new \ReflectionClass(__CLASS__);
$constants = $oClass->getConstants();
foreach ($exclude as $val) {
unset($constants[$val]);
}
return $constants;
}
public static function getStateMessage($state = false) {
$t = \app\classes\Translator::getInstance();
if ($state === false) {
return array_map(array($t, "_get"), self::$messages);
}
return isset(self::$messages[$state]) ? $t->_get(self::$messages[$state]) : FALSE;
}
public static function getLabelClass($state) {
return isset(self::$labels[$state]) ? self::$labels[$state] : FALSE;
}
}