forked from codeconsortium/CCDNForumForumBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CCDNForumForumBundle.php
118 lines (110 loc) · 5.4 KB
/
CCDNForumForumBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
/*
* This file is part of the CCDNForum ForumBundle
*
* (c) CCDN (c) CodeConsortium <http://www.codeconsortium.com/>
*
* Available on github <http://www.github.com/codeconsortium/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CCDNForum\ForumBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
*
* @author Reece Fowell <[email protected]>
* @version 1.0
*/
class CCDNForumForumBundle extends Bundle
{
public function boot()
{
$twig = $this->container->get('twig');
$twig->addGlobal('ccdn_forum_forum', array(
'seo' => array(
'title_length' => $this->container->getParameter('ccdn_forum_forum.seo.title_length'),
),
'category' => array(
'last_post_datetime_format' => $this->container->getParameter('ccdn_forum_forum.category.last_post_datetime_format'),
'index' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.category.index.layout_template'),
),
'show' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.category.show.layout_template'),
),
),
'board' => array(
'show' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.board.show.layout_template'),
'topic_title_truncate' => $this->container->getParameter('ccdn_forum_forum.board.show.topic_title_truncate'),
'first_post_datetime_format' => $this->container->getParameter('ccdn_forum_forum.board.show.first_post_datetime_format'),
'last_post_datetime_format' => $this->container->getParameter('ccdn_forum_forum.board.show.last_post_datetime_format'),
),
),
'item_board' => array(
'enable_bb_parser' => $this->container->getParameter('ccdn_forum_forum.item_board.enable_bb_parser'),
),
'topic' => array(
'show' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.topic.show.layout_template'),
'topic_closed_datetime_format' => $this->container->getParameter('ccdn_forum_forum.topic.show.topic_closed_datetime_format'),
'topic_deleted_datetime_format' => $this->container->getParameter('ccdn_forum_forum.topic.show.topic_deleted_datetime_format'),
),
'create' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.topic.create.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_forum_forum.topic.create.form_theme'),
'enable_bb_editor' => $this->container->getParameter('ccdn_forum_forum.topic.create.enable_bb_editor'),
),
'reply' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.topic.reply.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_forum_forum.topic.reply.form_theme'),
'enable_bb_editor' => $this->container->getParameter('ccdn_forum_forum.topic.reply.enable_bb_editor'),
),
),
'post' => array(
'show' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.post.show.layout_template'),
),
'edit_post' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.post.edit_post.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_forum_forum.post.edit_post.form_theme'),
'enable_bb_editor' => $this->container->getParameter('ccdn_forum_forum.post.edit_post.enable_bb_editor'),
),
'edit_topic' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.post.edit_topic.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_forum_forum.post.edit_topic.form_theme'),
'enable_bb_editor' => $this->container->getParameter('ccdn_forum_forum.post.edit_topic.enable_bb_editor'),
),
'delete_post' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.post.delete_post.layout_template'),
),
),
'item_post' => array(
'post_created_datetime_format' => $this->container->getParameter('ccdn_forum_forum.item_post.post_created_datetime_format'),
'post_edited_datetime_format' => $this->container->getParameter('ccdn_forum_forum.item_post.post_edited_datetime_format'),
'post_deleted_datetime_format' => $this->container->getParameter('ccdn_forum_forum.item_post.post_deleted_datetime_format'),
'enable_bb_parser' => $this->container->getParameter('ccdn_forum_forum.item_post.enable_bb_parser'),
),
'item_signature' => array(
'enable_bb_parser' => $this->container->getParameter('ccdn_forum_forum.item_signature.enable_bb_parser'),
),
'transcript' => array(
'post_creation_datetime_format' => $this->container->getParameter('ccdn_forum_forum.transcript.post_creation_datetime_format'),
'post_deleted_datetime_format' => $this->container->getParameter('ccdn_forum_forum.transcript.post_deleted_datetime_format'),
),
'draft' => array(
'list' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.draft.list.layout_template'),
'topic_title_truncate' => $this->container->getParameter('ccdn_forum_forum.draft.list.topic_title_truncate'),
'creation_datetime_format' => $this->container->getParameter('ccdn_forum_forum.draft.list.creation_datetime_format'),
),
),
'subscription' => array(
'list' => array(
'layout_template' => $this->container->getParameter('ccdn_forum_forum.subscription.list.layout_template'),
),
),
));
}
}