From 68a15fdba1dd8fe52cd88d7db41912f33403a1ba Mon Sep 17 00:00:00 2001 From: Igor Chepurnoy Date: Wed, 23 Sep 2015 13:06:06 +0300 Subject: [PATCH] Update BaseEnum.php --- helpers/BaseEnum.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helpers/BaseEnum.php b/helpers/BaseEnum.php index da0822a..aef7b70 100755 --- a/helpers/BaseEnum.php +++ b/helpers/BaseEnum.php @@ -144,16 +144,16 @@ public static function listData() return $result; } - /** + /** * Get label by value * @var string value * @return string label */ public static function getLabel($value) { - $list = self::listData(); + $list = static::$list; if (isset($list[$value])) { - return Yii::t(self::$messageCategory, $list[$value]); + return Yii::t(static::$messageCategory, $list[$value]); } return null; } @@ -244,7 +244,7 @@ public function getValue() * @param string $name The name of the value. * * @return boolean If the name is valid for this type, `true` is returned. - * Otherwise, the name is not valid and `false` is returned. + * Otherwise, the name is not valid and `false` is returned. */ public static function isValidName($name) { @@ -259,7 +259,7 @@ public static function isValidName($name) * @param string $value The value. * * @return boolean If the value is valid for this type, `true` is returned. - * Otherwise, the value is not valid and `false` is returned. + * Otherwise, the value is not valid and `false` is returned. */ public static function isValidValue($value) {