Pantheon\Terminus\Commands\Domain\DNSCommand::getRecommendations PHP Method

getRecommendations() public method

Display the recommended DNS settings for this environment
public getRecommendations ( string $site_env ) : Consolidation\OutputFormatters\StructuredData\RowsOfFields
$site_env string Site & environment to get DNS settings for, in the form `site-name.env`.
return Consolidation\OutputFormatters\StructuredData\RowsOfFields
    public function getRecommendations($site_env)
    {
        list(, $env) = $this->getSiteEnv($site_env);
        $domains = $env->getDomains()->setHydration('recommendations')->all();
        $settings = [];
        foreach ($domains as $domain) {
            $settings = array_merge($settings, array_map(function ($recommendation) use($domain) {
                $recommendation->name = $domain->id;
                return (array) $recommendation;
            }, $domain->get('dns_recommendations')));
        }
        return new RowsOfFields($settings);
    }