File: /home/safarimaris/home/safarimaris/common/components/Season.php
<?php
namespace common\components;
use Yii;
class Season
{
const SEASON_LOW = 1;
const SEASON_MID = 2;
const SEASON_HIGH = 3;
/**
* @return array list
*/
public static function getList()
{
return [
self::SEASON_LOW => Yii::t('model', 'Low Season'),
self::SEASON_MID => Yii::t('model', 'Middle Season'),
self::SEASON_HIGH => Yii::t('model', 'High Season')
];
}
/**
* @return string name
*/
public static function getName($id)
{
$types = self::getList();
return $types[$id];
}
}