if (!$domain) {
return $href;
}
- return 'https://' . $domain . $href;
+ return rtrim('https://' . $domain . '/' . $href, '/');
}
public function isNavigable()
*/
public function addChild($item)
{
+ if ($item->getRawLocale() === '') {
+ $item->setLocale($this->getLocale());
+ }
$this->_children[] = $item;
}
return $res;
}
+ public function getRawLocale()
+ {
+ return $this->_locale;
+ }
+
/**
* @return string
*/
{
if (!isset(self::$_mainDomains[$locale])) {
$all = self::getLocalesData();
- if (!isset($all[$locale])) {
+ if (!isset($all['locales'][$locale])) {
return false;
}
- $domains = $all[$locale]->domains;
+ $domains = $all['locales'][$locale]->domains;
if (is_string($domains)) {
$domains = json_decode($domains, true);
}