[Dev-Change] phpbb\controller\helper::url() removed

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

[Dev-Change] phpbb\controller\helper::url() removed

Post by nickvergessen »

The method phpbb\controller\helper::url() has been removed.
instead you should use phpbb\controller\helper::route() now.
This allows admins to change the routes, without editing any other files then the routing.yml

The parameters are almost the same, except the first one.
Instead of the URL, you inject the name of the route.
The second parameter is required to be an array.

For examples you can have a look at the test file:
https://github.com/phpbb/phpbb/blob/dev ... st.php#L53
No Support via PM
User avatar
pierredu
Registered User
Posts: 1256
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [Dev-Change] phpbb\controller\helper::url() removed

Post by pierredu »

Does somebody know where is this test file?
Or maybe a pointer to sample code for those functions?
Thanks in advance.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3726
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: [Dev-Change] phpbb\controller\helper::url() removed

Post by Kailey »

Looks like they got changed when the branches got renamed. The tests are located here. If you would like an example, have a look at any of the extensions that use routing (example from my Knowledge Base extension).
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
pierredu
Registered User
Posts: 1256
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [Dev-Change] phpbb\controller\helper::url() removed

Post by pierredu »

Thanks for the pointers.
Post Reply

Return to “Extension Writers Discussion”