News::beforeValidate PHP Method

beforeValidate() public method

public beforeValidate ( ) : boolean
return 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();
    }