protected function findModel($id) { if (($model = Menu::findOne($id)) !== null) { return $model; } throw new HttpException(404, 'The requested page does not exist.'); }