public function getSubject()
	{
		if (!$this->isNewRecord && $this->subject === null) {
			$this->subject = call_user_func([$this->model_class, 'findOne'], $this->foreign_pk);
			if ($this->subject === null) {
				$msg = Yii::t('app', 'Could not find model for attachment `{attachment}`', [
					'attachment'=>$this->id
				]);
				throw new ErrorException($msg);
			}
		}
		return $this->subject;
	}
public function getSubject()
	{
		if (!$this->isNewRecord && $this->subject === null) {
			$this->subject = call_user_func([$this->model_class, 'findOne'], $this->foreign_pk);
			if ($this->subject === null) {
				$msg = Yii::t('app', 'Could not find model for attachment `{attachment}`', [
					'attachment'=>$this->id
				]);
				throw new ErrorException($msg);
			}
		}
		return $this->subject;
	}
public function getSubject ( ) { if ( ! $ this -> isNewRecord && $ this -> subject === null ) { $ this -> subject = call_user_func ( [ $ this -> model_class , 'findOne' ] , $ this -> foreign_pk ) ; if ( $ this -> subject === null ) { $ msg = Yii :: t ( 'app' , 'Could not find model for attachment `{attachment}`' , [ 'attachment' => $ this -> id ] ) ; throw new ErrorException ( $ msg ) ; } } return $ this -> subject ; }
Getter for the subject model

@return \yii\db\ActiveRecord the subject of this comment
@throws \yii\base\ErrorException
Getter for the subject model