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;
    }
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;
    }
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 ; }
Get form data.

Conveniently removes non-desired properties and add the ID property.

@return object|null
Get form data .