Inheritance: extends Sulu\Component\Rest\ApiWrapper
Example #1
0
 /**
  * {@inheritdoc}
  *
  * @VirtualProperty
  */
 public function getTitle()
 {
     return $this->entity->getName();
 }
Example #2
0
 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' => []];
 }