News::beforeValidate PHP 메소드

beforeValidate() 공개 메소드

public beforeValidate ( ) : boolean
리턴 boolean
    public function beforeValidate()
    {
        if (!$this->slug) {
            $this->slug = yupe\helpers\YText::translit($this->title);
        }
        if (!$this->lang) {
            $this->lang = Yii::app()->getLanguage();
        }
        return parent::beforeValidate();
    }