/** * {@inheritdoc} * * @VirtualProperty */ public function getTitle() { return $this->entity->getName(); }
private function serialize(Account $account) { $tags = []; foreach ($account->getTags() as $tag) { $tags[] = $tag->getName(); } return ['number' => $account->getNumber(), 'name' => $account->getName(), 'registerNumber' => $account->getNumber(), 'placeOfJurisdiction' => $account->getPlaceOfJurisdiction(), 'uid' => $account->getUid(), 'corporation' => $account->getCorporation(), 'created' => $account->getCreated(), 'changed' => $account->getChanged(), 'medias' => $account->getMedias(), 'emails' => [], 'phones' => [], 'faxes' => [], 'urls' => [], 'tags' => $tags, 'categories' => []]; }