$title) { $extended_types[] = preg_replace("/[^a-z0-9_\-]/i", "", $key); } } $list = []; try { $reflectionClass = new \ReflectionClass(new \Hura8\Interfaces\EntityType()); foreach ($reflectionClass->getConstants() as $handle => $value) { $list[] = $value; } // add extend foreach ($extended_types as $type) { if(!in_array($type, $list)) { $list[] = $type; } } } catch (\ReflectionException $e) { // } return $list; }); } // list of languages can be enabled public static function languagePermitList() { return [ "vi" => "Tiếng Việt", // default "en" => "English", ]; } public static function mobileProviderPrefixList() { return static::getCache('mobileProviderPrefixList', function () { return include static::$constant_dir. '/mobile_provider.php'; }); } public static function customerStageList() { return static::getCache('customerStageList', function () { return include static::$constant_dir. '/customer_stage_list.php'; }); } public static function saluteList() { return static::getCache('genderList', function () { return include static::$constant_dir. '/salute_list.php'; }); } public static function genderList() { return static::getCache('genderList', function () { return include static::$constant_dir. '/gender_list.php'; }); } public static function industryList() { return static::getCache('industryList', function () { return include static::$constant_dir. '/industry_list.php'; }); } public static function maritalStatusList() { return static::getCache('maritalStatusList', function () { return include static::$constant_dir. '/marital_status_list.php'; }); } }