protected function findModel($id) { if (($model = System::findOne($id)) !== null) { return $model; } else { $this->setNotFoundHttpException(); } }