Browse Source

Merge branch 'develop'

master
Guillaume 3 years ago
parent
commit
c822bb6fa1
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      Resolver/MerchantResolver.php

+ 6
- 4
Resolver/MerchantResolver.php View File



public function getUrl(SectionInterface $section) public function getUrl(SectionInterface $section)
{ {
if ($this->urlResolver->isServerLocalhost()) {
return $this->router->generate('frontend_home', ['section' => $section->getSlug()], UrlGeneratorInterface::ABSOLUTE_URL);
} else {
return $this->settingSolver->getSettingValue($section->getMerchant(), MerchantSettingDefinition::SETTING_URL);
$url = $this->settingSolver->getSettingValue($section->getMerchant(), MerchantSettingDefinition::SETTING_URL);
if(!$section->getIsDefault()) {
$url .= $section->getSlug();
} }

return$url;
} }


public function getMerchantUser(UserInterface $user = null) public function getMerchantUser(UserInterface $user = null)

Loading…
Cancel
Save