original_string: public function get_data() {
          $data = parent::get_data();
          if (is_object($data)) {
              foreach (static::$fieldstoremove as $field) {
                  unset($data->{$field});
              }
              $data = static::convert_fields($data);
  
              // Ensure that the ID is set.
              $data->id = $this->persistent->get('id');
          }
          return $data;
      }
code: public function get_data() {
          $data = parent::get_data();
          if (is_object($data)) {
              foreach (static::$fieldstoremove as $field) {
                  unset($data->{$field});
              }
              $data = static::convert_fields($data);
  
              // Ensure that the ID is set.
              $data->id = $this->persistent->get('id');
          }
          return $data;
      }
code_tokens: public function get_data ( ) { $ data = parent :: get_data ( ) ; if ( is_object ( $ data ) ) { foreach ( static :: $ fieldstoremove as $ field ) { unset ( $ data -> { $ field } ) ; } $ data = static :: convert_fields ( $ data ) ; // Ensure that the ID is set. $ data -> id = $ this -> persistent -> get ( 'id' ) ; } return $ data ; }
docstring: Get form data.
  
  Conveniently removes non-desired properties and add the ID property.
  
  @return object|null
docstring_tokens: Get form data .