$entity->getKey(), 'dataValue' => $entity->getValue(), ]; } public function toBasicEntity(array $array) { $entity = new GlobalParam($array['id']); $entity->setKey($array['dataKey']); $entity->setValue($array['dataValue']); return $entity; } }