mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fixes #4724: fixed example in "Creating your own rule classes"
This commit is contained in:
@ -317,6 +317,13 @@ class CarUrlRule extends UrlRule
|
||||
{
|
||||
public $connectionID = 'db';
|
||||
|
||||
public function init()
|
||||
{
|
||||
if ($this->name === null) {
|
||||
$this->name = __CLASS__;
|
||||
}
|
||||
}
|
||||
|
||||
public function createUrl($manager, $route, $params)
|
||||
{
|
||||
if ($route === 'car/index') {
|
||||
|
||||
Reference in New Issue
Block a user