getTranslation() public method

Returns the translation model for the specified language.
public getTranslation ( string | null $language = null ) : ActiveRecord
$language string | null
return yii\db\ActiveRecord
Esempio n. 1
0
 /**
  * @inherited
  */
 public function getTranslation($language = null)
 {
     if ($language === null) {
         $language = Lang::getCurrent()->id;
     }
     return parent::getTranslation($language);
 }