OroCRM\Bundle\SalesBundle\Entity\B2bCustomer; class B2BCustomerNormalizer implements NormalizerInterface, DenormalizerInterface { /** * {@inheritdoc} */ public function denormalize($data, $class, $format = null, array $context = []) { return new B2bCustomer(); } /** * {@inheritdoc} */ public function supportsDenormalization($data, $type, $format = null, array $context = []) { return $type === 'OroCRM\Bundle\SalesBundle\Entity\B2bCustomer'; } /** * {@inheritdoc} */ public function normalize($object, $format = null, array $context = []) { /** @var B2BCustomer $object */ return ['name' => $object->getName()]; } /** * {@inheritdoc} */ public function supportsNormalization($data, $format = null, array $context = []) { return $data instanceof B2bCustomer; } } Import and Export