original_string: public function delete($id)
      {
          $this->loadModel('Taxonomy.Vocabularies');
          $vocabulary = $this->Vocabularies->get($id, [
              'conditions' => [
                  'locked' => 0
              ]
          ]);
  
          if ($this->Vocabularies->delete($vocabulary)) {
              $this->Flash->success(__d('taxonomy', 'Vocabulary has been successfully deleted!'));
          } else {
              $this->Flash->danger(__d('taxonomy', 'Vocabulary could not be deleted, please try again'));
          }
  
          $this->title(__d('taxonomy', 'Delete Vocabulary'));
          $this->redirect($this->referer());
      }
code: public function delete($id)
      {
          $this->loadModel('Taxonomy.Vocabularies');
          $vocabulary = $this->Vocabularies->get($id, [
              'conditions' => [
                  'locked' => 0
              ]
          ]);
  
          if ($this->Vocabularies->delete($vocabulary)) {
              $this->Flash->success(__d('taxonomy', 'Vocabulary has been successfully deleted!'));
          } else {
              $this->Flash->danger(__d('taxonomy', 'Vocabulary could not be deleted, please try again'));
          }
  
          $this->title(__d('taxonomy', 'Delete Vocabulary'));
          $this->redirect($this->referer());
      }
code_tokens: public function delete ( $ id ) { $ this -> loadModel ( 'Taxonomy.Vocabularies' ) ; $ vocabulary = $ this -> Vocabularies -> get ( $ id , [ 'conditions' => [ 'locked' => 0 ] ] ) ; if ( $ this -> Vocabularies -> delete ( $ vocabulary ) ) { $ this -> Flash -> success ( __d ( 'taxonomy' , 'Vocabulary has been successfully deleted!' ) ) ; } else { $ this -> Flash -> danger ( __d ( 'taxonomy' , 'Vocabulary could not be deleted, please try again' ) ) ; } $ this -> title ( __d ( 'taxonomy' , 'Delete Vocabulary' ) ) ; $ this -> redirect ( $ this -> referer ( ) ) ; }
docstring: Removes the given vocabulary by ID.
  
  @param int $id Vocabulary's ID
  @return void Redirects to previous page
docstring_tokens: Removes the given vocabulary by ID .