Classes/FormDataProvider/ValuePickerItemDataProvider.php
protected function getHosts(): array
    {
        $domains = [];
        foreach ($this->siteFinder->getAllSites() as $site) {
            foreach ($site->getAllLanguages() as $language) {
                $domains[] = $language->getBase()->getHost();
            }
        }
        $domains = array_unique($domains);
        sort($domains, SORT_NATURAL);
        return $domains;
    }
protected function getHosts(): array
    {
        $domains = [];
        foreach ($this->siteFinder->getAllSites() as $site) {
            foreach ($site->getAllLanguages() as $language) {
                $domains[] = $language->getBase()->getHost();
            }
        }
        $domains = array_unique($domains);
        sort($domains, SORT_NATURAL);
        return $domains;
    }
protected function getHosts ( ) : array { $ domains = [ ] ; foreach ( $ this -> siteFinder -> getAllSites ( ) as $ site ) { foreach ( $ site -> getAllLanguages ( ) as $ language ) { $ domains [ ] = $ language -> getBase ( ) -> getHost ( ) ; } } $ domains = array_unique ( $ domains ) ; sort ( $ domains , SORT_NATURAL ) ; return $ domains ; }
Get all hosts from sites

@return array domain records
Get all hosts from sites