| 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/backend-accounting.sk/app/modules/users/code/ |
Upload File : |
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace modules\users\code;
/**
* Description of UserContractType
*
* @author maros
*/
class UserContractType {
CONST INTERNAL = "INTERNAL";
CONST EXTERNAL = "EXTERNAL";
private static $messages = array(
self::INTERNAL => "Interný",
self::EXTERNAL => "Externý"
);
private static $labels = array(
self::INTERNAL => "success",
self::EXTERNAL => "warning"
);
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;
}
}