| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | Class UrlManager extends WebUrlManager |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Returns the canonical URL of the currently requested page. |
||
| 11 | * |
||
| 12 | * The canonical URL is constructed using the current controller's [[\yii\web\Controller::route]] and |
||
| 13 | * [[\yii\web\Controller::actionParams]]. You may use the following code in the layout view to add a link tag |
||
| 14 | * about canonical URL: |
||
| 15 | * |
||
| 16 | * ```php |
||
| 17 | * $this->registerLinkTag(['rel' => 'canonical', 'href' => Url::canonical()]); |
||
| 18 | * ``` |
||
| 19 | * |
||
| 20 | * @return string the canonical URL of the currently requested page |
||
| 21 | */ |
||
| 22 | public function getCanonical() |
||
| 37 | } |
||
| 38 | } |