Skip to content

Commit 0ef139b

Browse files
url services
1 parent fed21db commit 0ef139b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

services/Url.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,22 @@ public function getCurrentBaseUrl()
314314

315315
return $this->_currentBaseUrl;
316316
}
317-
317+
318+
protected $_homeUrl;
319+
public function setHomeUrl($homeUrl)
320+
{
321+
322+
$this->_homeUrl = $homeUrl;
323+
}
318324
/**
319325
* get current home url , is was generate by 'http://'.store_code.
320326
*/
321327
public function homeUrl()
322328
{
329+
if ($this->_homeUrl) {
330+
331+
return $this->_homeUrl;
332+
}
323333
return Yii::$app->getHomeUrl();
324334
}
325335

0 commit comments

Comments
 (0)