Neos.Neos/Classes/Command/DomainCommandController.php
public function listCommand($hostname = null)
    {
        if ($hostname === null) {
            $domains = $this->domainRepository->findAll();
        } else {
            $domains = $this->domainRepository->findByHostname($hostname);
        }

        if (count($domains) === 0) {
            $this->outputLine('No domain entries available.');
            $this->quit(0);
        }

        $availableDomains = [];
        foreach ($domains as $domain) {
            /** @var \Neos\Neos\Domain\Model\Domain $domain */
            $availableDomains[] = [
                'nodeName' => $domain->getSite()->getNodeName(),
                'hostname' => (string)$domain,
                'active' => $domain->getActive() ? 'active' : 'inactive'
            ];
        }

        $this->output->outputTable($availableDomains, ['Node name', 'Domain (Scheme/Host/Port)', 'State']);
    }
public function listCommand($hostname = null)
    {
        if ($hostname === null) {
            $domains = $this->domainRepository->findAll();
        } else {
            $domains = $this->domainRepository->findByHostname($hostname);
        }

        if (count($domains) === 0) {
            $this->outputLine('No domain entries available.');
            $this->quit(0);
        }

        $availableDomains = [];
        foreach ($domains as $domain) {
            /** @var \Neos\Neos\Domain\Model\Domain $domain */
            $availableDomains[] = [
                'nodeName' => $domain->getSite()->getNodeName(),
                'hostname' => (string)$domain,
                'active' => $domain->getActive() ? 'active' : 'inactive'
            ];
        }

        $this->output->outputTable($availableDomains, ['Node name', 'Domain (Scheme/Host/Port)', 'State']);
    }
public function listCommand ( $ hostname = null ) { if ( $ hostname === null ) { $ domains = $ this -> domainRepository -> findAll ( ) ; } else { $ domains = $ this -> domainRepository -> findByHostname ( $ hostname ) ; } if ( count ( $ domains ) === 0 ) { $ this -> outputLine ( 'No domain entries available.' ) ; $ this -> quit ( 0 ) ; } $ availableDomains = [ ] ; foreach ( $ domains as $ domain ) { /** @var \Neos\Neos\Domain\Model\Domain $domain */ $ availableDomains [ ] = [ 'nodeName' => $ domain -> getSite ( ) -> getNodeName ( ) , 'hostname' => ( string ) $ domain , 'active' => $ domain -> getActive ( ) ? 'active' : 'inactive' ] ; } $ this -> output -> outputTable ( $ availableDomains , [ 'Node name' , 'Domain (Scheme/Host/Port)' , 'State' ] ) ; }
Display a list of available domain records

@param string $hostname An optional hostname to search for
@return void
Display a list of available domain records