public function getUrl($scheme = false)
{
if ($this->redirect) {
return $this->redirect;
}
if ($this->redirect_tree_id) {
if ($this->redirectTree->id != $this->id) {
return $this->redirectTree->getUrl($scheme);
}
}
if ($this->site) {
if (!$this->site->server_name) {
return Url::to(['/cms/tree/view', 'model' => $this], $scheme);
} else {
//TODO::update this is
$standartUrl = Url::to(['/cms/tree/view', 'model' => $this], false);
$standartUrl = str_replace(\Yii::$app->urlManager->baseUrl, '', $standartUrl);
return $this->site->url . $standartUrl;
}
}
return Url::to(['/cms/tree/view', 'model' => $this], $scheme);
}