mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/13645] Move the feeds to controllers
PHPBB3-13645
This commit is contained in:
committed by
Tristan Darricau
parent
f56fe0ba8d
commit
8e5e954438
@@ -84,12 +84,9 @@ services:
|
||||
- @template
|
||||
- @user
|
||||
- @config
|
||||
- @router
|
||||
- @symfony_request
|
||||
- @request
|
||||
- @filesystem
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- @routing.helper
|
||||
|
||||
controller.resolver:
|
||||
class: phpbb\controller\resolver
|
||||
|
@@ -1,4 +1,18 @@
|
||||
services:
|
||||
phpbb.feed.controller:
|
||||
class: phpbb\feed\controller\feed
|
||||
arguments:
|
||||
- @template.twig.environment
|
||||
- @symfony_request
|
||||
- @controller.helper
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @service_container
|
||||
- @feed.helper
|
||||
- @user
|
||||
- @auth
|
||||
- %core.php_ext%
|
||||
|
||||
feed.helper:
|
||||
class: phpbb\feed\helper
|
||||
arguments:
|
||||
@@ -7,13 +21,6 @@ services:
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
feed.factory:
|
||||
class: phpbb\feed\factory
|
||||
arguments:
|
||||
- @service_container
|
||||
- @config
|
||||
- @dbal.conn
|
||||
|
||||
feed.forum:
|
||||
class: phpbb\feed\forum
|
||||
scope: prototype
|
||||
|
@@ -18,3 +18,14 @@ services:
|
||||
- @request_stack
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
routing.helper:
|
||||
class: phpbb\routing\helper
|
||||
arguments:
|
||||
- @config
|
||||
- @router
|
||||
- @symfony_request
|
||||
- @request
|
||||
- @filesystem
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
@@ -40,9 +40,9 @@ services:
|
||||
- { name: twig.extension }
|
||||
|
||||
template.twig.extensions.routing:
|
||||
class: Symfony\Bridge\Twig\Extension\RoutingExtension
|
||||
class: phpbb\template\twig\extension\routing
|
||||
arguments:
|
||||
- @router
|
||||
- @routing.helper
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
|
35
phpBB/config/default/routing/feed.yml
Normal file
35
phpBB/config/default/routing/feed.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
phpbb_feed_forums:
|
||||
path: /forums
|
||||
defaults: { _controller: phpbb.feed.controller:forums }
|
||||
|
||||
phpbb_feed_news:
|
||||
path: /news
|
||||
defaults: { _controller: phpbb.feed.controller:news }
|
||||
|
||||
phpbb_feed_topics:
|
||||
path: /topics
|
||||
defaults: { _controller: phpbb.feed.controller:topics }
|
||||
|
||||
phpbb_feed_topics_active:
|
||||
path: /topics_active
|
||||
defaults: { _controller: phpbb.feed.controller:topics_active }
|
||||
|
||||
phpbb_feed_topics_new:
|
||||
path: /topics_new
|
||||
defaults: { _controller: phpbb.feed.controller:topics_new }
|
||||
|
||||
phpbb_feed_forum:
|
||||
path: /forum/{forum_id}
|
||||
defaults: { _controller: phpbb.feed.controller:forum }
|
||||
requirements:
|
||||
forum_id: \d+
|
||||
|
||||
phpbb_feed_topic:
|
||||
path: /topic/{topic_id}
|
||||
defaults: { _controller: phpbb.feed.controller:topic }
|
||||
requirements:
|
||||
topic_id: \d+
|
||||
|
||||
phpbb_feed_overall:
|
||||
path: /{mode}
|
||||
defaults: { _controller: phpbb.feed.controller:overall }
|
@@ -8,6 +8,14 @@
|
||||
# instantiate the "foo_service" service and call the "method" method.
|
||||
#
|
||||
|
||||
phpbb_feed_routing:
|
||||
resource: "feed.yml"
|
||||
prefix: /feed
|
||||
|
||||
phpbb_feed_index:
|
||||
path: /feed
|
||||
defaults: { _controller: phpbb.feed.controller:overall }
|
||||
|
||||
phpbb_help_routing:
|
||||
resource: "help.yml"
|
||||
prefix: /help
|
||||
|
Reference in New Issue
Block a user