public function actionDelete($id)
 {
     if (!Category::isCategoryInUseById(intval($id))) {
         $category = Category::GetById(intval($id));
         ControllerSecurityUtil::resolveAccessCanCurrentUserDeleteModel($category);
         $category->delete();
     } else {
         Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'Not possible to delete. Category is already in use'));
     }
     $this->redirect(array($this->getId() . '/index'));
 }