Commit 14fc5bd1 by Alexander Makarov

Added Url::canonical

parent 5420517e
......@@ -80,5 +80,15 @@ class BaseUrl
{
Yii::$app->user->setReturnUrl(Yii::$app->getRequest()->getUrl());
}
/**
* Returns canonical URL for the current page
*
* @return string canonical URL
*/
public function canonical()
{
return Yii::$app->controller->getCanonicalUrl();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment