actions/PageAction.php 1 location
|
@@ 107-114 (lines=8) @@
|
104 |
|
* @return null|CmsModel |
105 |
|
* @throws NotFoundHttpException |
106 |
|
*/ |
107 |
|
protected function findModel() |
108 |
|
{ |
109 |
|
if (($model = CmsModel::findOne($this->pageId)) !== null) { |
110 |
|
return $model; |
111 |
|
} |
112 |
|
|
113 |
|
throw new NotFoundHttpException(Yii::t('yii2mod.cms', 'The requested page does not exist.')); |
114 |
|
} |
115 |
|
} |
controllers/CmsController.php 1 location
|
@@ 140-147 (lines=8) @@
|
137 |
|
* @return CmsModel the loaded model |
138 |
|
* @throws NotFoundHttpException if the model cannot be found |
139 |
|
*/ |
140 |
|
protected function findModel($id) |
141 |
|
{ |
142 |
|
if (($model = CmsModel::findOne($id)) !== null) { |
143 |
|
return $model; |
144 |
|
} else { |
145 |
|
throw new NotFoundHttpException(Yii::t('yii2mod.cms', 'The requested page does not exist.')); |
146 |
|
} |
147 |
|
} |
148 |
|
|
149 |
|
} |
150 |
|
|