Size: a a a

2020 April 10

DS

Dmitriy S in Yii Framework 3
TradersVE
There is nothing wrong, I tell you there is some way to get the request url, diferent $request->getUri()->getPath()
You can use $urlMatcher->getCurrentUrl()->get....
источник

T

TradersVE in Yii Framework 3
Dmitriy S
You can use $urlMatcher->getCurrentUrl()->get....
Ummmm.
источник

DS

Dmitriy S in Yii Framework 3
Maybe it is not a real name of the method, but the UrlMatcher has something like that
источник

T

TradersVE in Yii Framework 3
👍
источник

T

TradersVE in Yii Framework 3
it is important for the menu widget and activeform and activefield I am developing.
источник

DS

Dmitriy S in Yii Framework 3
TradersVE
it is important for the menu widget and activeform and activefield I am developing.
источник

T

TradersVE in Yii Framework 3
😁
источник

DS

Dmitriy S in Yii Framework 3
Maybe it does make sense to add a method getCurrentUrl() to UrlGenerator
источник

T

TradersVE in Yii Framework 3
Dmitriy S
Maybe it does make sense to add a method getCurrentUrl() to UrlGenerator
off course
источник

DS

Dmitriy S in Yii Framework 3
You can make it as $urlGenerator->generate($urlMatcher->getCurrentRoute()->getName()) now😂
источник

T

TradersVE in Yii Framework 3
Dmitriy S
You can make it as $urlGenerator->generate($urlMatcher->getCurrentRoute()->getName()) now😂
of course it's better than injecting the path to the controller..
источник

T

TradersVE in Yii Framework 3
work perfect 😁😁
источник

DS

Dmitriy S in Yii Framework 3
In the controller you can inject ServerRequestInterface to get the current request
источник

T

TradersVE in Yii Framework 3
Dmitriy S
In the controller you can inject ServerRequestInterface to get the current request
bether one line.
источник

T

TradersVE in Yii Framework 3
Dmitriy S
In the controller you can inject ServerRequestInterface to get the current request
I did that but I keep your solution.
источник

DS

Dmitriy S in Yii Framework 3
TradersVE
I did that but I keep your solution.
Keep in mind that ServerRequestInterface $request is the request after middleware stack processing, but $urlMatcher->getCurrentRoute() is the original matched request.
источник

T

TradersVE in Yii Framework 3
Dmitriy S
Keep in mind that ServerRequestInterface $request is the request after middleware stack processing, but $urlMatcher->getCurrentRoute() is the original matched request.
Work perfect for me.
источник

T

TradersVE in Yii Framework 3
<?= NavBar::begin()
   ->brandLabel($params->get('app.name'))
   ->brandUrl('/')
   ->options(['class' => 'navbar navbar-dark bg-dark navbar-expand-lg'])
   ->start() ?>

   <?= Nav::widget()
       ->currentPath($urlGenerator->generate($urlMatcher->getCurrentRoute()->getName()))
       ->items($menuItems)
       ->options(['class' => 'navbar-nav float-right ml-auto']) ?>

<?= NavBar::end();
источник

T

TradersVE in Yii Framework 3
by the way excellent about the parameters::class.
источник

Д

Дмитрий in Yii Framework 3
$urlGenerator->generate($urlMatcher->getCurrentRoute()->getName()
источник