| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function generate( |
||
| 32 | string $name, |
||
| 33 | TenantInterface $tenant, |
||
| 34 | array $parameters = [] |
||
| 35 | ): string { |
||
| 36 | $context = $this->router->getContext(); |
||
| 37 | $host = $tenant->getDomainName(); |
||
| 38 | if (null !== ($subdomain = $tenant->getSubdomain())) { |
||
| 39 | $host = $subdomain.'.'.$host; |
||
| 40 | } |
||
| 41 | |||
| 42 | $context->setHost($host); |
||
| 43 | |||
| 44 | return $this->router->generate($name, $parameters, RouterInterface::ABSOLUTE_URL); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |