original_string: public function delete() : bool {
          global $DB;
          $DB->delete_records('customfield_data', ['fieldid' => $this->get('id')]);
          return $this->field->delete();
      }
code: public function delete() : bool {
          global $DB;
          $DB->delete_records('customfield_data', ['fieldid' => $this->get('id')]);
          return $this->field->delete();
      }
code_tokens: public function delete ( ) : bool { global $ DB ; $ DB -> delete_records ( 'customfield_data' , [ 'fieldid' => $ this -> get ( 'id' ) ] ) ; return $ this -> field -> delete ( ) ; }
docstring: Delete a field and all associated data
  
  Plugins may override it if it is necessary to delete related data (such as files)
  
  Not that the delete() method from data_controller is not called here.
  
  @return bool
docstring_tokens: Delete a field and all associated data