/
ContainerHelperTrait.php
189 lines (165 loc) · 3.96 KB
/
ContainerHelperTrait.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<?php
namespace Kryn\CmsBundle;
trait ContainerHelperTrait
{
/**
* @return Core
*/
public function getKrynCore()
{
return $this->container->get('kryn_cms');
}
/**
* @return ORM\Builder\Builder
*/
public function getModelBuilder()
{
return $this->container->get('kryn_cms.model.builder');
}
/**
* @return AssetHandler\Container
*/
public function getAssetCompilerContainer()
{
return $this->container->get('kryn_cms.asset_handler.container');
}
/**
* Returns a Filesystem interface for the root folder (where your composer.json is placed)
*
* @return \Kryn\CmsBundle\Filesystem\FilesystemInterface
*/
public function getFileSystem()
{
return $this->container->get('kryn_cms.filesystem.local');
}
/**
* Returns a Filesystem interface for the current cache directory.
*
* @return \Kryn\CmsBundle\Filesystem\FilesystemInterface
*/
public function getCacheFileSystem()
{
return $this->container->get('kryn_cms.filesystem.cache');
}
/**
* Returns a Filesystem interface with mount-capability for the /web directory.
*
* @return \Kryn\CmsBundle\Filesystem\WebFilesystem
*/
public function getWebFileSystem()
{
return $this->container->get('kryn_cms.filesystem.web');
}
/**
* @return Objects
*/
public function getObjects()
{
return $this->container->get('kryn_cms.objects');
}
/**
* @return \Symfony\Component\HttpKernel\Log\LoggerInterface
*/
public function getLogger()
{
return $this->container->get('logger');
}
/**
* @return \Symfony\Component\HttpFoundation\Request
*/
public function getRequest()
{
return $this->container->get('request_stack')->getCurrentRequest();
}
/**
* @return \Symfony\Component\HttpFoundation\RequestStack
*/
public function getRequestStack()
{
return $this->container->get('request_stack');
}
/**
* @return PageResponse
*/
public function getPageResponse()
{
return $this->container->get('kryn_cms.page.response');
}
/**
* @return \AppKernel
*/
public function getKernel()
{
return $this->container->get('kernel');
}
/**
* @return \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
public function getEventDispatcher()
{
return $this->container->get('event_dispatcher');
}
/**
* @return \Kryn\CmsBundle\Cache\CacheInterface
*/
public function getFastCache()
{
return $this->container->get('kryn_cms.cache.fast');
}
/**
* @return Navigation
*/
public function getNavigation()
{
return $this->container->get('kryn_cms.navigation');
}
/**
* @return StopwatchHelper
*/
public function getStopwatch()
{
return $this->container->get('kryn_cms.stopwatch');
}
/**
* @return ACL
*/
public function getACL()
{
return $this->container->get('kryn_cms.acl');
}
/**
* @return \Symfony\Bundle\FrameworkBundle\Routing\Router
*/
public function getRouter()
{
return $this->container->get('router');
}
/**
* @return Translation\Translator
*/
public function getTranslator()
{
return $this->container->get('kryn_cms.translator');
}
/**
* @return ContentRender
*/
public function getContentRender()
{
return $this->container->get('kryn_cms.content.render');
}
/**
* @return ContentTypes\ContentTypes
*/
public function getContentTypes()
{
return $this->container->get('kryn_cms.content.types');
}
/**
* @return Admin\FieldTypes\FieldTypes
*/
public function getFieldTypes()
{
return $this->container->get('kryn_cms.field.types');
}
}