public function actionDelete($navItemId)
    {
        if (!Yii::$app->adminuser->canRoute(Module::ROUTE_PAGE_DELETE)) {
            throw new ForbiddenHttpException("Unable to perform this action due to permission restrictions");
        }
        
        $model = NavItem::findOne($navItemId);
        
        if ($model) {
            return $model->delete();
        }
        
        return $this->sendModelError($model);
    }
public function actionDelete($navItemId)
    {
        if (!Yii::$app->adminuser->canRoute(Module::ROUTE_PAGE_DELETE)) {
            throw new ForbiddenHttpException("Unable to perform this action due to permission restrictions");
        }
        
        $model = NavItem::findOne($navItemId);
        
        if ($model) {
            return $model->delete();
        }
        
        return $this->sendModelError($model);
    }
public function actionDelete ( $ navItemId ) { if ( ! Yii :: $ app -> adminuser -> canRoute ( Module :: ROUTE_PAGE_DELETE ) ) { throw new ForbiddenHttpException ( "Unable to perform this action due to permission restrictions" ) ; } $ model = NavItem :: findOne ( $ navItemId ) ; if ( $ model ) { return $ model -> delete ( ) ; } return $ this -> sendModelError ( $ model ) ; }
Delete a nav item based on the id.

@param integer $navItemId The id of the item to delete.
@throws ForbiddenHttpException
@return array|boolean
Delete a nav item based on the id .