public function delete() { if (empty($this->id)) { return; } delete_records('artefact_file_image', 'artefact', $this->id); parent::delete(); }