Пример #1
0
 /**
  * {@inheritdoc}
  */
 protected function getSerializationConfig()
 {
     $config = ['excluded_fields' => ['email'], 'fields' => ['source' => ['fields' => 'name'], 'method' => ['fields' => 'name'], 'assignedTo' => ['fields' => 'id'], 'owner' => ['fields' => 'id'], 'reportsTo' => ['fields' => 'id'], 'createdBy' => ['fields' => 'id'], 'updatedBy' => ['fields' => 'id'], 'organization' => ['fields' => 'name'], 'emails' => ['exclusion_policy' => 'all', 'fields' => ['email' => null, 'primary' => null], 'orderBy' => ['primary' => 'DESC']], 'phones' => ['exclusion_policy' => 'all', 'fields' => ['phone' => null, 'primary' => null], 'orderBy' => ['primary' => 'DESC']], 'addresses' => AddressApiUtils::getAddressConfig(true), 'groups' => ['fields' => ['organization' => ['fields' => 'name'], 'owner' => ['fields' => 'username']]], 'accounts' => ['fields' => 'id'], 'picture' => ['fields' => 'id']], 'post_serialize' => function (array &$result) {
         $this->postSerializeContact($result);
     }];
     return $config;
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 protected function getSerializationConfig()
 {
     $config = ['fields' => ['shippingAddress' => AddressApiUtils::getAddressConfig(), 'billingAddress' => AddressApiUtils::getAddressConfig(), 'account' => ['fields' => 'id'], 'contact' => ['fields' => 'id'], 'leads' => ['fields' => 'id'], 'opportunities' => ['fields' => 'id'], 'owner' => ['fields' => 'id'], 'organization' => ['fields' => 'name'], 'createdBy' => ['fields' => 'id'], 'updatedBy' => ['fields' => 'id']]];
     return $config;
 }