/**
* @return array<mixed>
*/
public function jsonSerialize(): array
{ $data = parent::
jsonSerialize();
unset($data['_entityName'
]);
unset($data['_fieldVisibility'
]);
$data =
$this->
filterInvisibleFields($data);
if (!
$this->
hasExtension('foreignKeys'
)) { return $data;
} $extension =
$this->
getExtension('foreignKeys'
);
if (!
$extension instanceof ArrayEntity
) { return $data;
}