public function getClientsAndContentTypesAsChoices(): array
    {
        $clientsAndContentTypes = [];

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

            $clientsAndContentTypes[$client->getSpace()->getName()] = $clientName;
            foreach ($client->getContentTypes()->getItems() as $contentType) {
                /* @var \Contentful\Delivery\Resource\ContentType $contentType */
                $clientsAndContentTypes['>  ' . $contentType->getName()] = $clientName . '|' . $contentType->getId();
            }
        }

        return $clientsAndContentTypes;
    }
public function getClientsAndContentTypesAsChoices(): array
    {
        $clientsAndContentTypes = [];

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

            $clientsAndContentTypes[$client->getSpace()->getName()] = $clientName;
            foreach ($client->getContentTypes()->getItems() as $contentType) {
                /* @var \Contentful\Delivery\Resource\ContentType $contentType */
                $clientsAndContentTypes['>  ' . $contentType->getName()] = $clientName . '|' . $contentType->getId();
            }
        }

        return $clientsAndContentTypes;
    }
public function getClientsAndContentTypesAsChoices ( ) : array { $ clientsAndContentTypes = [ ] ; foreach ( $ this -> clientsConfig as $ clientName => $ clientConfig ) { /** @var \Contentful\Delivery\Client $client */ $ client = $ clientConfig [ 'service' ] ; $ clientsAndContentTypes [ $ client -> getSpace ( ) -> getName ( ) ] = $ clientName ; foreach ( $ client -> getContentTypes ( ) -> getItems ( ) as $ contentType ) { /* @var \Contentful\Delivery\Resource\ContentType $contentType */ $ clientsAndContentTypes [ '>  ' . $ contentType -> getName ( ) ] = $ clientName . '|' . $ contentType -> getId ( ) ; } } return $ clientsAndContentTypes ; }
Returns the list of clients and content types for usage in Symfony Forms.
Returns the list of clients and content types for usage in Symfony Forms .