public function getSpacesAsChoices(): array
    {
        $spaces = [];

        foreach ($this->clientsConfig as $clientConfig) {
            /** @var \Contentful\Delivery\Client $client */
            $client = $clientConfig['service'];

            $spaces[$client->getSpace()->getName()] = $clientConfig['space'];
        }

        return $spaces;
    }
public function getSpacesAsChoices(): array
    {
        $spaces = [];

        foreach ($this->clientsConfig as $clientConfig) {
            /** @var \Contentful\Delivery\Client $client */
            $client = $clientConfig['service'];

            $spaces[$client->getSpace()->getName()] = $clientConfig['space'];
        }

        return $spaces;
    }
public function getSpacesAsChoices ( ) : array { $ spaces = [ ] ; foreach ( $ this -> clientsConfig as $ clientConfig ) { /** @var \Contentful\Delivery\Client $client */ $ client = $ clientConfig [ 'service' ] ; $ spaces [ $ client -> getSpace ( ) -> getName ( ) ] = $ clientConfig [ 'space' ] ; } return $ spaces ; }
Returns the list of spaces for usage in Symfony Forms.

@return string[]
Returns the list of spaces for usage in Symfony Forms .