setModel( match ($this->params->getRequired('type')) { 'host', Source::TYPE_ALL => Host::class, 'service' => Service::class, default => $this->httpBadRequest('Invalid type') } ) ->onlyWithCustomVarSources(['host', 'service']) ->withFixedColumns([ 'host.name' => $this->translate('Host Name'), 'hostgroup.name' => $this->translate('Hostgroup Name'), 'host.user.name' => $this->translate('Contact Name'), 'host.usergroup.name' => $this->translate('Contactgroup Name'), 'service.name' => $this->translate('Service Name'), 'servicegroup.name' => $this->translate('Servicegroup Name'), 'service.user.name' => $this->translate('Contact Name'), 'service.usergroup.name' => $this->translate('Contactgroup Name') ]); $this->getDocument()->addHtml( $suggestions->forRequest($this->getServerRequest()) ); } }