43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
|
|
<?
|
||
|
|
namespace common\menu\structure;
|
||
|
|
use core\lang\structure\LangVariable as V;
|
||
|
|
use common\Menu\structure\menuLang as Vars;
|
||
|
|
|
||
|
|
class eMenuCssClass {
|
||
|
|
const NONE = 0;
|
||
|
|
const VK = 1;
|
||
|
|
const FB = 2;
|
||
|
|
const TW = 3;
|
||
|
|
const IG = 4;
|
||
|
|
const TELEGRAM = 5;
|
||
|
|
const WHATSAPP = 6;
|
||
|
|
const VIBER = 7;
|
||
|
|
|
||
|
|
static $arr = null;
|
||
|
|
static function getArray(){
|
||
|
|
if(self::$arr) return self::$arr;
|
||
|
|
else return self::$arr = [
|
||
|
|
self::NONE => ['class'=>'vk','n'=>V::get(Vars::$CSS_CLASS_NONE)],
|
||
|
|
self::VK => ['class'=>'vk','n'=>V::get(Vars::$CSS_CLASS_VK)],
|
||
|
|
self::FB => ['class'=>'fb','n'=>V::get(Vars::$CSS_CLASS_FB)],
|
||
|
|
self::TW => ['class'=>'tw','n'=>V::get(Vars::$CSS_CLASS_TW)],
|
||
|
|
self::IG => ['class'=>'ig','n'=>V::get(Vars::$CSS_CLASS_IG)],
|
||
|
|
self::TELEGRAM => ['class'=>'ig','n'=>V::get(Vars::$CSS_CLASS_TELEGRAM)],
|
||
|
|
self::WHATSAPP => ['class'=>'ig','n'=>V::get(Vars::$CSS_CLASS_WHATSAPP)],
|
||
|
|
self::VIBER => ['class'=>'ig','n'=>V::get(Vars::$CSS_CLASS_VIBER)],
|
||
|
|
];
|
||
|
|
}
|
||
|
|
static function getName($x){ return self::getArray()[$x]['n']; }
|
||
|
|
static function getClass($x){
|
||
|
|
return self::getArray()[$x]['class']; }
|
||
|
|
static function getNameList(){
|
||
|
|
$res = [];
|
||
|
|
$a = self::getArray();
|
||
|
|
foreach ($a as $k=>$v){
|
||
|
|
$res[$k] = $v['n'];
|
||
|
|
}
|
||
|
|
return $res;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|