public function serialize(array $options = [])
    {
        $facets = $this->repository
            ->findVisibleFacets($this->tokenStorage->getToken(), in_array(Options::REGISTRATION, $options));

        return array_map(function (Facet $facet) {
            return $this->facetSerializer->serialize($facet, [Options::PROFILE_SERIALIZE]);
        }, $facets);
    }
public function serialize(array $options = [])
    {
        $facets = $this->repository
            ->findVisibleFacets($this->tokenStorage->getToken(), in_array(Options::REGISTRATION, $options));

        return array_map(function (Facet $facet) {
            return $this->facetSerializer->serialize($facet, [Options::PROFILE_SERIALIZE]);
        }, $facets);
    }
public function serialize ( array $ options = [ ] ) { $ facets = $ this -> repository -> findVisibleFacets ( $ this -> tokenStorage -> getToken ( ) , in_array ( Options :: REGISTRATION , $ options ) ) ; return array_map ( function ( Facet $ facet ) { return $ this -> facetSerializer -> serialize ( $ facet , [ Options :: PROFILE_SERIALIZE ] ) ; } , $ facets ) ; }
Serializes the profile configuration.

@param array $options

@return array
Serializes the profile configuration .