Example #1
0
 protected function findModel($id)
 {
     if (($model = CustomMenus::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Example #2
0
 public function getParentMenu()
 {
     return $this->hasOne(CustomMenus::className(), ['id' => 'fid']);
 }