public function toSerializableArray($entity)
    {
        $data = array_intersect_key($entity->getData(), $entity->getEntityDescription()->getAttributes());

        return $data;
    }
public function toSerializableArray($entity)
    {
        $data = array_intersect_key($entity->getData(), $entity->getEntityDescription()->getAttributes());

        return $data;
    }
public function toSerializableArray ( $ entity ) { $ data = array_intersect_key ( $ entity -> getData ( ) , $ entity -> getEntityDescription ( ) -> getAttributes ( ) ) ; return $ data ; }
Return an array of serializable data of the entity in format of associative array.

The default implementation return an array of scalar attributes

@param AnDomainEntityAbstract $entity

@return array
Return an array of serializable data of the entity in format of associative array .