admin/controllers/MenuItemController.php
/**
     * Finds the MenuItem model based on its primary key value.
     * If the model is not found, a 404 HTTP exception will be thrown.
     * @param integer $id
     * @return MenuItem|\yii\db\ActiveRecord
     * @throws NotFoundHttpException if the model cannot be found
     */
Finds the MenuItem model based on its primary key value.
If the model is not found, a 404 HTTP exception will be thrown.
@param integer $id
@return MenuItem|\yii\db\ActiveRecord
@throws NotFoundHttpException if the model cannot be found
Finds the MenuItem model based on its primary key value . If the model is not found a 404 HTTP exception will be thrown . @param integer $id @return MenuItem| \ yii \ db \ ActiveRecord @throws NotFoundHttpException if the model cannot be found
protected function findModelMulti($id)
    {
        if (($model = MenuItem::find()->where(['id' => $id])->multilingual()->one()) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested item does not exist.');
        }
    }
protected function findModelMulti ( $ id ) { if ( ( $ model = MenuItem :: find ( ) -> where ( [ 'id' => $ id ] ) -> multilingual ( ) -> one ( ) ) !== null ) { return $ model ; } else { throw new NotFoundHttpException ( 'The requested item does not exist.' ) ; } }
Finds the MenuItem model based on its primary key value.
Finds the MenuItem model based on its primary key value .