Getter for the subject model

@return \yii\db\ActiveRecord the subject of this comment
@throws \yii\base\ErrorException
509560
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;
	}
1078745
public function getRecord()
    {
        if (!$this->record && $this->form) {
            if ($this->form->getRecord() && is_a($this->form->getRecord(), 'DataObject')) {
                $this->record = $this->form->getRecord();
            } elseif ($this->form->Controller() && $this->form->Controller()->hasMethod('data')
                    && $this->form->Controller()->data() && is_a($this->form->Controller()->data(), 'DataObject')) {
                $this->record = $this->form->Controller()->data();
            }
        }
        return $this->record;
    }
505035
public function getDataProvider()
    {
        if ($this->dataProvider === null) {
            $formName = $this->getSearchModel()->formName();
            $search = ArrayHelper::merge($this->findOptions, Yii::$app->request->get($formName) ?: Yii::$app->request->get() ?: Yii::$app->request->post());

            $modelClass = $this->getModelClass();
            $this->returnOptions[$modelClass] = ArrayHelper::merge(
                ArrayHelper::remove($search, 'return', []),
                ArrayHelper::remove($search, 'rename', [])
            );

            $this->dataProvider = $this->getSearchModel()->search([$formName => $search], $this->dataProviderOptions);
        }

        return $this->dataProvider;
    }
932667
public function getRelation() {
        if (is_null($this->_relation) || $this->_relation->getRelationId() !== $this->getRelationId()) {
            $model = $this->loader->getModels()->getRespondentRelationModel();
            $relationObject = $model->getRelation($this->getRespondentId(), $this->getRelationId());
            $this->_relation = $relationObject;
        }

        return $this->_relation;
    }
876063
public function getUser()
    {
        if ($this->user_id) {
            return $this->hasOne(Yii::$app->user->identityClass, ['id' => 'user_id']);
        }
        return null;
    }
436455
public function getError()
    {
        $this->setResponseHeaders();
        \Yii::$app->response->setStatusCode(400);

        return $this->error ? new ErrorResponse(['error' => $this->error]) : null;
    }
1176645
public function SubjectMessage() {
		if($this->subjectMessage == null) {
			$this->subjectMessage = $this->commit->getSubjectMessage();
		}

		return htmlentities($this->subjectMessage);
	}
578521
public function actionIndex()
    {
        $request = \Yii::$app->request;
        if ($request->getIsOptions()) {
            return $this->ResponseOptions($this->verbs()['index']);
        }
        $searchModel = new AuthItemSearch(['type' => $this->type]);
        $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
        return $dataProvider;
    }
448675
public static function blame()
    {
        if (Yii::$app instanceof Application && !Podium::getInstance()->user->isGuest) {
            return User::loggedId();
        }
        return null;
    }
642124
public function actionIndex()
    {
        $query = Question::find()->with('user');

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $query->applyOrder(Yii::$app->request->get('order', 'new'));

        return $this->render('index', ['dataProvider' => $dataProvider]);
    }
1148603
public function get_requester() {
        global $DB;
        static $requesters= array();
        if (!array_key_exists($this->properties->requester, $requesters)) {
            $requesters[$this->properties->requester] = $DB->get_record('user', array('id'=>$this->properties->requester));
        }
        return $requesters[$this->properties->requester];
    }
1121729
public function getErrors()
    {
        $diff = array_diff_key($this->_properties, $this->_errors);

        return $this->_errors + (new Collection($diff))
            ->filter(function ($value) {
                return is_array($value) || $value instanceof EntityInterface;
            })
            ->map(function ($value) {
                return $this->_readError($value);
            })
            ->filter()
            ->toArray();
    }
108499
public function actionIndex()
    {
        $request = \Yii::$app->request;
        if ($request->getIsOptions()) {
            return $this->ResponseOptions($this->verbs()['index']);
        }
        try{
            $searchModel = new BizRuleSearch();
            $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
            //var_dump($dataProvider);die();
            return $dataProvider;
        }catch(Exception $e){
            throw new Exception($e);
        }

    }
1302176
public function actionGetUser()
    {
        $rr = new RequestResponse();

        $rr->data = [
            'identity' => \Yii::$app->user->identity,
            'user' => \Yii::$app->user,
        ];

        return $rr;
    }
646365
public function getCollection()
    {
        if ($this->parent) {
            return $this->parent->getCollection();
        }

        if (!is_object($this->_collection)) {
            $action = $this->controller->action;
            if ($action instanceof self) {
                $scenario = $action->getScenario();
            } else {
                $scenario = $action->id;
            }

            $this->_collection = Yii::createObject(ArrayHelper::merge([
                'class' => Collection::class,
                'model' => $this->controller->newModel(['scenario' => $scenario]),
                'scenario' => $scenario,
                'queryOptions' => $this->queryOptions,
            ], (array) $this->_collection));
        }

        return $this->_collection;
    }
785665
public function get()
    {
        $modelResult = $this->getRequest()->request(
            'GET',
            $this->getRequestUrl('models')
        );

        return $this->getModelsFromResult($modelResult);
    }
653971
public function loadModel()
	{
		if($this->_model===null)
		{
			if(isset($_GET['id']))
			{
				if(Yii::app()->user->isGuest)
					$condition='status='.Post::STATUS_PUBLISHED.' OR status='.Post::STATUS_ARCHIVED;
				else
					$condition='';
				$this->_model=Post::model()->findByPk($_GET['id'], $condition);
			}
			if($this->_model===null)
				throw new CHttpException(404,'The requested page does not exist.');
		}
		return $this->_model;
	}