MenuController::loadModel PHP Method

loadModel() public method

If the data model is not found, an HTTP exception will be raised.
public loadModel ( $id )
    public function loadModel($id)
    {
        $model = Menu::model()->findByPk($id);
        if ($model === null) {
            throw new CHttpException(404, 'The requested page does not exist.');
        }
        return $model;
    }