src/Sulu/Bundle/LocationBundle/Geolocator/GeolocatorLocation.php
public function toArray()
    {
        $res = [];
        foreach ([
            'id',
            'displayTitle',
            'street',
            'number',
            'code',
            'town',
            'country',
            'longitude',
            'latitude',
        ] as $propertyName) {
            $res[$propertyName] = $this->{'get' . ucfirst($propertyName)}();
        }

        $res['name'] = TextUtils::truncate($this->getDisplayTitle(), 75);

        return $res;
    }
public function toArray()
    {
        $res = [];
        foreach ([
            'id',
            'displayTitle',
            'street',
            'number',
            'code',
            'town',
            'country',
            'longitude',
            'latitude',
        ] as $propertyName) {
            $res[$propertyName] = $this->{'get' . ucfirst($propertyName)}();
        }

        $res['name'] = TextUtils::truncate($this->getDisplayTitle(), 75);

        return $res;
    }
public function toArray ( ) { $ res = [ ] ; foreach ( [ 'id' , 'displayTitle' , 'street' , 'number' , 'code' , 'town' , 'country' , 'longitude' , 'latitude' , ] as $ propertyName ) { $ res [ $ propertyName ] = $ this -> { 'get' . ucfirst ( $ propertyName ) } ( ) ; } $ res [ 'name' ] = TextUtils :: truncate ( $ this -> getDisplayTitle ( ) , 75 ) ; return $ res ; }
Serialize the location to an array.

@return array
Serialize the location to an array .