| @@ 217-224 (lines=8) @@ | ||
| 214 | * |
|
| 215 | * @throws NotFoundHttpException if the model cannot be found |
|
| 216 | */ |
|
| 217 | protected function findModel($id) |
|
| 218 | { |
|
| 219 | if (($model = Screen::findOne($id)) !== null) { |
|
| 220 | return $model; |
|
| 221 | } else { |
|
| 222 | throw new NotFoundHttpException(Yii::t('app', 'The requested screen does not exist.')); |
|
| 223 | } |
|
| 224 | } |
|
| 225 | } |
|
| 226 | ||
| @@ 192-199 (lines=8) @@ | ||
| 189 | * |
|
| 190 | * @throws NotFoundHttpException if the model cannot be found |
|
| 191 | */ |
|
| 192 | protected function findModel($id) |
|
| 193 | { |
|
| 194 | if (($model = User::findOne($id)) !== null) { |
|
| 195 | return $model; |
|
| 196 | } else { |
|
| 197 | throw new NotFoundHttpException(Yii::t('app', 'The requested user does not exist.')); |
|
| 198 | } |
|
| 199 | } |
|
| 200 | } |
|
| 201 | ||
| @@ 147-154 (lines=8) @@ | ||
| 144 | * |
|
| 145 | * @throws NotFoundHttpException if the model cannot be found |
|
| 146 | */ |
|
| 147 | protected function findModel($id) |
|
| 148 | { |
|
| 149 | if (($model = ScreenTemplate::findOne($id)) !== null) { |
|
| 150 | return $model; |
|
| 151 | } else { |
|
| 152 | throw new NotFoundHttpException(Yii::t('app', 'The requested template does not exist.')); |
|
| 153 | } |
|
| 154 | } |
|
| 155 | ||
| 156 | /** |
|
| 157 | * Create a field and save it. |
|
| @@ 190-197 (lines=8) @@ | ||
| 187 | * |
|
| 188 | * @throws NotFoundHttpException if the model cannot be found |
|
| 189 | */ |
|
| 190 | protected function findModel($id) |
|
| 191 | { |
|
| 192 | if (($model = Device::findOne($id)) !== null) { |
|
| 193 | return $model; |
|
| 194 | } else { |
|
| 195 | throw new NotFoundHttpException(Yii::t('app', 'The requested device does not exist.')); |
|
| 196 | } |
|
| 197 | } |
|
| 198 | } |
|
| 199 | ||
| @@ 164-171 (lines=8) @@ | ||
| 161 | * |
|
| 162 | * @throws NotFoundHttpException if the model cannot be found |
|
| 163 | */ |
|
| 164 | protected function findModel($id) |
|
| 165 | { |
|
| 166 | if (($model = Flow::findOne($id)) !== null) { |
|
| 167 | return $model; |
|
| 168 | } else { |
|
| 169 | throw new NotFoundHttpException(Yii::t('app', 'The requested flow does not exist.')); |
|
| 170 | } |
|
| 171 | } |
|
| 172 | } |
|
| 173 | ||
| @@ 99-106 (lines=8) @@ | ||
| 96 | * |
|
| 97 | * @throws NotFoundHttpException if the model cannot be found |
|
| 98 | */ |
|
| 99 | protected function findModel($id) |
|
| 100 | { |
|
| 101 | if (($model = TemplateBackground::findOne($id)) !== null) { |
|
| 102 | return $model; |
|
| 103 | } else { |
|
| 104 | throw new NotFoundHttpException(Yii::t('app', 'The requested template background does not exist.')); |
|
| 105 | } |
|
| 106 | } |
|
| 107 | } |
|
| 108 | ||
| @@ 82-89 (lines=8) @@ | ||
| 79 | * |
|
| 80 | * @throws NotFoundHttpException if the model cannot be found |
|
| 81 | */ |
|
| 82 | protected function findModel($id) |
|
| 83 | { |
|
| 84 | if (($model = ContentType::findOne($id)) !== null) { |
|
| 85 | return $model; |
|
| 86 | } else { |
|
| 87 | throw new NotFoundHttpException(Yii::t('app', 'The requested content does not exist.')); |
|
| 88 | } |
|
| 89 | } |
|
| 90 | } |
|
| 91 | ||
| @@ 336-343 (lines=8) @@ | ||
| 333 | * |
|
| 334 | * @throws NotFoundHttpException if the model cannot be found |
|
| 335 | */ |
|
| 336 | protected function findModel($id) |
|
| 337 | { |
|
| 338 | if (($model = Content::findOne($id)) !== null) { |
|
| 339 | return $model; |
|
| 340 | } else { |
|
| 341 | throw new NotFoundHttpException(Yii::t('app', 'The requested content does not exist.')); |
|
| 342 | } |
|
| 343 | } |
|
| 344 | } |
|
| 345 | ||