]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Resources/config/services.yml
First draft for EntrySortType
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / config / services.yml
1 services:
2 wallabag_core.helper.detect_active_theme:
3 class: Wallabag\CoreBundle\Helper\DetectActiveTheme
4 arguments:
5 - "@security.token_storage"
6 - "%wallabag_core.theme%"
7
8 # custom form type
9 wallabag_core.form.type.config:
10 class: Wallabag\CoreBundle\Form\Type\ConfigType
11 arguments:
12 - "%liip_theme.themes%"
13 - "%wallabag_core.languages%"
14 tags:
15 - { name: form.type }
16
17 wallabag_core.filter.type.entry:
18 class: Wallabag\CoreBundle\Form\Type\EntryFilterType
19 arguments:
20 - "@wallabag_core.entry_repository"
21 - "@security.token_storage"
22 tags:
23 - { name: form.type }
24
25 wallabag_core.sort.type.entry:
26 class: Wallabag\CoreBundle\Form\Type\EntrySortType
27 arguments:
28 - "@security.token_storage"
29 tags:
30 - { name: form.type }
31
32 wallabag_core.param_converter.username_feed_token_converter:
33 class: Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter
34 tags:
35 - { name: request.param_converter, converter: username_feed_token_converter }
36 arguments:
37 - "@doctrine"
38
39 wallabag_core.subscriber.table_prefix:
40 class: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber
41 arguments:
42 - "%database_table_prefix%"
43 tags:
44 - { name: doctrine.event_subscriber }
45
46 wallabag_core.graby:
47 class: Graby\Graby
48 arguments:
49 -
50 error_message: '%wallabag_core.fetching_error_message%'
51 error_message_title: '%wallabag_core.fetching_error_message_title%'
52 - "@wallabag_core.http_client"
53 - "@wallabag_core.graby.config_builder"
54 calls:
55 - [ setLogger, [ "@logger" ] ]
56 tags:
57 - { name: monolog.logger, channel: graby }
58
59 wallabag_core.graby.config_builder:
60 class: Graby\SiteConfig\ConfigBuilder
61 arguments:
62 - {}
63 - "@logger"
64
65 wallabag_core.http_client:
66 alias: 'httplug.client.wallabag_core'
67
68 wallabag_core.guzzle_authenticator.config_builder:
69 class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
70 arguments:
71 - "@wallabag_core.graby.config_builder"
72 - "@security.token_storage"
73 - "@wallabag_core.site_credential_repository"
74 - '@logger'
75 tags:
76 - { name: monolog.logger, channel: graby }
77
78 # service alias override
79 bd_guzzle_site_authenticator.site_config_builder:
80 alias: wallabag_core.guzzle_authenticator.config_builder
81
82 wallabag_core.http_client_factory:
83 class: Wallabag\CoreBundle\Helper\HttpClientFactory
84 arguments:
85 - "@wallabag_core.guzzle.cookie_jar"
86 - '@=service(''craue_config'').get(''restricted_access'')'
87 - '@logger'
88 calls:
89 - ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]]
90
91 wallabag_core.guzzle.cookie_jar:
92 class: Wallabag\CoreBundle\Helper\FileCookieJar
93 arguments:
94 - "@logger"
95 - "%kernel.cache_dir%/cookiejar.json"
96
97 wallabag_core.content_proxy:
98 class: Wallabag\CoreBundle\Helper\ContentProxy
99 arguments:
100 - "@wallabag_core.graby"
101 - "@wallabag_core.rule_based_tagger"
102 - "@wallabag_core.rule_based_ignore_origin_processor"
103 - "@validator"
104 - "@logger"
105 - '%wallabag_core.fetching_error_message%'
106 - '@=service(''craue_config'').get(''store_article_headers'')'
107
108 wallabag_core.tags_assigner:
109 class: Wallabag\CoreBundle\Helper\TagsAssigner
110 arguments:
111 - "@wallabag_core.tag_repository"
112
113 wallabag_core.rule_based_tagger:
114 class: Wallabag\CoreBundle\Helper\RuleBasedTagger
115 arguments:
116 - "@rulerz"
117 - "@wallabag_core.tag_repository"
118 - "@wallabag_core.entry_repository"
119 - "@logger"
120
121 wallabag_core.rule_based_ignore_origin_processor:
122 class: Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor
123 arguments:
124 - "@rulerz"
125 - "@logger"
126 - "@wallabag_core.ignore_origin_instance_rule_repository"
127
128 # repository as a service
129 wallabag_core.entry_repository:
130 class: Wallabag\CoreBundle\Repository\EntryRepository
131 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
132 arguments:
133 - WallabagCoreBundle:Entry
134
135 wallabag_core.tag_repository:
136 class: Wallabag\CoreBundle\Repository\TagRepository
137 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
138 arguments:
139 - WallabagCoreBundle:Tag
140
141 wallabag_core.site_credential_repository:
142 class: Wallabag\CoreBundle\Repository\SiteCredentialRepository
143 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
144 arguments:
145 - WallabagCoreBundle:SiteCredential
146 calls:
147 - [ setCrypto, [ "@wallabag_core.helper.crypto_proxy" ] ]
148
149 wallabag_core.ignore_origin_instance_rule_repository:
150 class: Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository
151 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
152 arguments:
153 - WallabagCoreBundle:IgnoreOriginInstanceRule
154
155 wallabag_core.helper.entries_export:
156 class: Wallabag\CoreBundle\Helper\EntriesExport
157 arguments:
158 - "@translator"
159 - '%domain_name%'
160 - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png
161
162 wallabag.operator.array.matches:
163 class: Wallabag\CoreBundle\Operator\PHP\Matches
164 tags:
165 - { name: rulerz.operator, target: native, operator: matches }
166
167 wallabag.operator.doctrine.matches:
168 class: Wallabag\CoreBundle\Operator\Doctrine\Matches
169 tags:
170 - { name: rulerz.operator, target: doctrine, operator: matches, inline: true }
171
172 wallabag.operator.array.notmatches:
173 class: Wallabag\CoreBundle\Operator\PHP\NotMatches
174 tags:
175 - { name: rulerz.operator, target: native, operator: notmatches }
176
177 wallabag.operator.doctrine.notmatches:
178 class: Wallabag\CoreBundle\Operator\Doctrine\NotMatches
179 tags:
180 - { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true }
181
182 wallabag.operator.array.pattern_matches:
183 class: Wallabag\CoreBundle\Operator\PHP\PatternMatches
184 tags:
185 - { name: rulerz.operator, target: native, operator: "~" }
186
187 wallabag_core.helper.redirect:
188 class: Wallabag\CoreBundle\Helper\Redirect
189 arguments:
190 - "@router"
191 - "@security.token_storage"
192
193 wallabag_core.helper.prepare_pager_for_entries:
194 class: Wallabag\CoreBundle\Helper\PreparePagerForEntries
195 arguments:
196 - "@security.token_storage"
197 - "@router"
198
199 wallabag_core.redis.client:
200 class: Predis\Client
201 arguments:
202 -
203 scheme: '%redis_scheme%'
204 host: '%redis_host%'
205 port: '%redis_port%'
206 path: '%redis_path%'
207 password: '%redis_password%'
208
209 wallabag_core.exception_controller:
210 class: Wallabag\CoreBundle\Controller\ExceptionController
211 public: true
212 arguments:
213 - '@twig'
214 - '%kernel.debug%'
215
216 wallabag_core.subscriber.sqlite_cascade_delete:
217 class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber
218 arguments:
219 - "@doctrine"
220 tags:
221 - { name: doctrine.event_subscriber }
222
223 wallabag_core.subscriber.download_images:
224 class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber
225 arguments:
226 - "@doctrine.orm.default_entity_manager"
227 - "@wallabag_core.entry.download_images"
228 - '@=service(''craue_config'').get(''download_images_enabled'')'
229 - "@logger"
230 tags:
231 - { name: kernel.event_subscriber }
232
233 wallabag_core.entry.download_images:
234 class: Wallabag\CoreBundle\Helper\DownloadImages
235 arguments:
236 - "@wallabag_core.entry.download_images.client"
237 - "%kernel.project_dir%/web/assets/images"
238 - '%domain_name%'
239 - "@logger"
240
241 wallabag_core.entry.download_images.client:
242 alias: 'httplug.client.wallabag_core.entry.download_images'
243
244 wallabag_core.helper.crypto_proxy:
245 class: Wallabag\CoreBundle\Helper\CryptoProxy
246 arguments:
247 - "%wallabag_core.site_credentials.encryption_key_path%"
248 - "@logger"
249
250 wallabag_core.command.clean_duplicates:
251 class: Wallabag\CoreBundle\Command\CleanDuplicatesCommand
252 tags: ['console.command']
253
254 wallabag_core.command.export:
255 class: Wallabag\CoreBundle\Command\ExportCommand
256 tags: ['console.command']
257
258 wallabag_core.command.install:
259 class: Wallabag\CoreBundle\Command\InstallCommand
260 tags: ['console.command']
261
262 wallabag_core.command.list_user:
263 class: Wallabag\CoreBundle\Command\ListUserCommand
264 tags: ['console.command']
265
266 wallabag_core.command.reload_entry:
267 class: Wallabag\CoreBundle\Command\ReloadEntryCommand
268 tags: ['console.command']
269
270 wallabag_core.command.show_user:
271 class: Wallabag\CoreBundle\Command\ShowUserCommand
272 tags: ['console.command']
273
274 wallabag_core.command.tag_all:
275 class: Wallabag\CoreBundle\Command\TagAllCommand
276 tags: ['console.command']