original_string: public function actionDeleteCategory($id = null)
      {
          $model = Category::find()->where(['id' => $id])->limit(1)->one();
          if (empty($model)) {
              $this->error(Yii::t('podium/flash', 'Sorry! We can not find Category with this ID.'));
              return $this->redirect(['admin/categories']);
          }
          if ($model->delete()) {
              PodiumCache::clearAfter('categoryDelete');
              Log::info('Category deleted', $model->id, __METHOD__);
              $this->success(Yii::t('podium/flash', 'Category has been deleted.'));
          } else {
              Log::error('Error while deleting category', $model->id, __METHOD__);
              $this->error(Yii::t('podium/flash', 'Sorry! There was some error while deleting the category.'));
          }
          return $this->redirect(['admin/categories']);
      }
code: public function actionDeleteCategory($id = null)
      {
          $model = Category::find()->where(['id' => $id])->limit(1)->one();
          if (empty($model)) {
              $this->error(Yii::t('podium/flash', 'Sorry! We can not find Category with this ID.'));
              return $this->redirect(['admin/categories']);
          }
          if ($model->delete()) {
              PodiumCache::clearAfter('categoryDelete');
              Log::info('Category deleted', $model->id, __METHOD__);
              $this->success(Yii::t('podium/flash', 'Category has been deleted.'));
          } else {
              Log::error('Error while deleting category', $model->id, __METHOD__);
              $this->error(Yii::t('podium/flash', 'Sorry! There was some error while deleting the category.'));
          }
          return $this->redirect(['admin/categories']);
      }
code_tokens: public function actionDeleteCategory ( $ id = null ) { $ model = Category :: find ( ) -> where ( [ 'id' => $ id ] ) -> limit ( 1 ) -> one ( ) ; if ( empty ( $ model ) ) { $ this -> error ( Yii :: t ( 'podium/flash' , 'Sorry! We can not find Category with this ID.' ) ) ; return $ this -> redirect ( [ 'admin/categories' ] ) ; } if ( $ model -> delete ( ) ) { PodiumCache :: clearAfter ( 'categoryDelete' ) ; Log :: info ( 'Category deleted' , $ model -> id , __METHOD__ ) ; $ this -> success ( Yii :: t ( 'podium/flash' , 'Category has been deleted.' ) ) ; } else { Log :: error ( 'Error while deleting category' , $ model -> id , __METHOD__ ) ; $ this -> error ( Yii :: t ( 'podium/flash' , 'Sorry! There was some error while deleting the category.' ) ) ; } return $ this -> redirect ( [ 'admin/categories' ] ) ; }
docstring: Deleting the category of given ID.
  @param int $id
  @return Response
docstring_tokens: Deleting the category of given ID .