public function delete_instance(int $instanceid) {
        $fielddata = api::get_instance_fields_data($this->get_fields(), $instanceid, false);
        foreach ($fielddata as $data) {
            $data->delete();
        }
    }
public function delete_instance(int $instanceid) {
        $fielddata = api::get_instance_fields_data($this->get_fields(), $instanceid, false);
        foreach ($fielddata as $data) {
            $data->delete();
        }
    }
public function delete_instance ( int $ instanceid ) { $ fielddata = api :: get_instance_fields_data ( $ this -> get_fields ( ) , $ instanceid , false ) ; foreach ( $ fielddata as $ data ) { $ data -> delete ( ) ; } }
Deletes all data related to all fields of an instance.

@param int $instanceid
Deletes all data related to all fields of an instance .