]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Resources/config/services.yml
Merge pull request #2677 from wallabag/add-wallabag_user.de.yml
[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.param_converter.username_rsstoken_converter:
26 class: Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter
27 tags:
28 - { name: request.param_converter, converter: username_rsstoken_converter }
29 arguments:
30 - "@doctrine"
31
32 wallabag_core.subscriber.table_prefix:
33 class: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber
34 arguments:
35 - "%database_table_prefix%"
36 tags:
37 - { name: doctrine.event_subscriber }
38
39 wallabag_core.graby:
40 class: Graby\Graby
41 arguments:
42 -
43 error_message: '%wallabag_core.fetching_error_message%'
44 - "@wallabag_core.guzzle.http_client"
45 - "@wallabag_core.graby.config_builder"
46 calls:
47 - [ setLogger, [ "@logger" ] ]
48 tags:
49 - { name: monolog.logger, channel: graby }
50
51 wallabag_core.graby.config_builder:
52 class: Graby\SiteConfig\ConfigBuilder
53 arguments:
54 - {}
55 - "@logger"
56
57 wallabag_core.guzzle.http_client:
58 class: GuzzleHttp\ClientInterface
59 factory: ["@wallabag_core.guzzle.http_client_factory", buildHttpClient]
60
61 wallabag_core.guzzle_authenticator.config_builder:
62 class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
63 arguments:
64 - "@wallabag_core.graby.config_builder"
65 - "%sites_credentials%"
66
67 # service alias override
68 bd_guzzle_site_authenticator.site_config_builder:
69 alias: wallabag_core.guzzle_authenticator.config_builder
70
71 wallabag_core.guzzle.http_client_factory:
72 class: Wallabag\CoreBundle\Helper\HttpClientFactory
73 arguments:
74 - "@bd_guzzle_site_authenticator.authenticator_subscriber"
75 - "@wallabag_core.guzzle.cookie_jar"
76 - '@=service(''craue_config'').get(''restricted_access'')'
77
78 wallabag_core.guzzle.cookie_jar:
79 class: GuzzleHttp\Cookie\FileCookieJar
80 arguments: ["%kernel.cache_dir%/cookiejar.json"]
81
82 wallabag_core.content_proxy:
83 class: Wallabag\CoreBundle\Helper\ContentProxy
84 arguments:
85 - "@wallabag_core.graby"
86 - "@wallabag_core.rule_based_tagger"
87 - "@wallabag_core.tag_repository"
88 - "@logger"
89
90 wallabag_core.rule_based_tagger:
91 class: Wallabag\CoreBundle\Helper\RuleBasedTagger
92 arguments:
93 - "@rulerz"
94 - "@wallabag_core.tag_repository"
95 - "@wallabag_core.entry_repository"
96
97 # repository as a service
98 wallabag_core.entry_repository:
99 class: Wallabag\CoreBundle\Repository\EntryRepository
100 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
101 arguments:
102 - WallabagCoreBundle:Entry
103
104 wallabag_core.tag_repository:
105 class: Wallabag\CoreBundle\Repository\TagRepository
106 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
107 arguments:
108 - WallabagCoreBundle:Tag
109
110 wallabag_core.helper.entries_export:
111 class: Wallabag\CoreBundle\Helper\EntriesExport
112 arguments:
113 - '@=service(''craue_config'').get(''wallabag_url'')'
114 - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png
115
116 wallabag.operator.array.matches:
117 class: Wallabag\CoreBundle\Operator\PHP\Matches
118 tags:
119 - { name: rulerz.operator, executor: rulerz.executor.array, operator: matches }
120
121 wallabag.operator.doctrine.matches:
122 class: Wallabag\CoreBundle\Operator\Doctrine\Matches
123 tags:
124 - { name: rulerz.operator, executor: rulerz.executor.doctrine, operator: matches, inline: true }
125
126 wallabag_core.helper.redirect:
127 class: Wallabag\CoreBundle\Helper\Redirect
128 arguments:
129 - "@router"
130 - "@security.token_storage"
131
132 wallabag_core.helper.prepare_pager_for_entries:
133 class: Wallabag\CoreBundle\Helper\PreparePagerForEntries
134 arguments:
135 - "@security.token_storage"
136 - "@router"
137
138 wallabag_core.redis.client:
139 class: Predis\Client
140 arguments:
141 -
142 scheme: '%redis_scheme%'
143 host: '%redis_host%'
144 port: '%redis_port%'
145 path: '%redis_path%'
146 password: '%redis_password%'
147
148 wallabag_core.exception_controller:
149 class: Wallabag\CoreBundle\Controller\ExceptionController
150 arguments:
151 - '@twig'
152 - '%kernel.debug%'
153
154 wallabag_core.subscriber.sqlite_cascade_delete:
155 class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber
156 arguments:
157 - "@doctrine"
158 tags:
159 - { name: doctrine.event_subscriber }
160
161 wallabag_core.subscriber.download_images:
162 class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber
163 arguments:
164 - "@doctrine.orm.default_entity_manager"
165 - "@wallabag_core.entry.download_images"
166 - '@=service(''craue_config'').get(''download_images_enabled'')'
167 - "@logger"
168 tags:
169 - { name: kernel.event_subscriber }
170
171 wallabag_core.entry.download_images:
172 class: Wallabag\CoreBundle\Helper\DownloadImages
173 arguments:
174 - "@wallabag_core.entry.download_images.client"
175 - "%kernel.root_dir%/../web/assets/images"
176 - '@=service(''craue_config'').get(''wallabag_url'')'
177 - "@logger"
178
179 wallabag_core.entry.download_images.client:
180 class: GuzzleHttp\Client