]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
Merge remote-tracking branch 'origin/master' into 2.3
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / DataFixtures / ORM / LoadSettingData.php
CommitLineData
d6ba77e8
JB
1<?php
2
3namespace Wallabag\CoreBundle\DataFixtures\ORM;
4
5use Doctrine\Common\DataFixtures\AbstractFixture;
6use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager;
8use Craue\ConfigBundle\Entity\Setting;
9
10class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
11{
12 /**
13 * {@inheritdoc}
14 */
15 public function load(ObjectManager $manager)
16 {
17 $settings = [
d0545b6b
NL
18 [
19 'name' => 'share_public',
20 'value' => '1',
21 'section' => 'entry',
22 ],
d6ba77e8
JB
23 [
24 'name' => 'carrot',
25 'value' => '1',
26 'section' => 'entry',
27 ],
28 [
29 'name' => 'share_diaspora',
30 'value' => '1',
31 'section' => 'entry',
32 ],
33 [
34 'name' => 'diaspora_url',
35 'value' => 'http://diasporapod.com',
36 'section' => 'entry',
37 ],
8a9604aa
NL
38 [
39 'name' => 'share_unmark',
40 'value' => '1',
41 'section' => 'entry',
42 ],
43 [
44 'name' => 'unmark_url',
45 'value' => 'https://unmark.it',
46 'section' => 'entry',
47 ],
d6ba77e8
JB
48 [
49 'name' => 'share_shaarli',
50 'value' => '1',
51 'section' => 'entry',
52 ],
fb9f100e
F
53 [
54 'name' => 'share_scuttle',
55 'value' => '1',
56 'section' => 'entry',
b5a5377a 57 ],
d6ba77e8
JB
58 [
59 'name' => 'shaarli_url',
60 'value' => 'http://myshaarli.com',
61 'section' => 'entry',
62 ],
fb9f100e
F
63 [
64 'name' => 'scuttle_url',
65 'value' => 'http://scuttle.org',
66 'section' => 'entry',
b5a5377a 67 ],
d6ba77e8
JB
68 [
69 'name' => 'share_mail',
70 'value' => '1',
71 'section' => 'entry',
72 ],
73 [
74 'name' => 'share_twitter',
75 'value' => '1',
76 'section' => 'entry',
77 ],
78 [
79 'name' => 'export_epub',
80 'value' => '1',
81 'section' => 'export',
82 ],
83 [
84 'name' => 'export_mobi',
85 'value' => '1',
86 'section' => 'export',
87 ],
88 [
89 'name' => 'export_pdf',
90 'value' => '1',
91 'section' => 'export',
92 ],
a74a6ca2
JB
93 [
94 'name' => 'export_csv',
95 'value' => '1',
96 'section' => 'export',
97 ],
98 [
99 'name' => 'export_json',
100 'value' => '1',
101 'section' => 'export',
102 ],
103 [
104 'name' => 'export_txt',
105 'value' => '1',
106 'section' => 'export',
107 ],
108 [
109 'name' => 'export_xml',
110 'value' => '1',
111 'section' => 'export',
112 ],
40d2a294 113 [
b3437d58
JB
114 'name' => 'import_with_redis',
115 'value' => '0',
116 'section' => 'import',
117 ],
118 [
119 'name' => 'import_with_rabbitmq',
40d2a294
NL
120 'value' => '0',
121 'section' => 'import',
122 ],
d6ba77e8
JB
123 [
124 'name' => 'show_printlink',
125 'value' => '1',
126 'section' => 'entry',
127 ],
128 [
129 'name' => 'wallabag_support_url',
130 'value' => 'https://www.wallabag.org/pages/support.html',
131 'section' => 'misc',
132 ],
133 [
134 'name' => 'wallabag_url',
135 'value' => 'http://v2.wallabag.org',
136 'section' => 'misc',
137 ],
07643dde
NL
138 [
139 'name' => 'piwik_enabled',
140 'value' => '0',
141 'section' => 'analytics',
142 ],
143 [
144 'name' => 'piwik_host',
2cbf0d05 145 'value' => 'v2.wallabag.org',
07643dde
NL
146 'section' => 'analytics',
147 ],
148 [
149 'name' => 'piwik_site_id',
150 'value' => '1',
151 'section' => 'analytics',
152 ],
a4f42c59
JB
153 [
154 'name' => 'demo_mode_enabled',
155 'value' => '0',
156 'section' => 'misc',
157 ],
158 [
159 'name' => 'demo_mode_username',
160 'value' => 'wallabag',
161 'section' => 'misc',
162 ],
d1495dd0
JB
163 [
164 'name' => 'download_images_enabled',
165 'value' => '0',
aedd6ca0 166 'section' => 'misc',
d1495dd0 167 ],
d64bf795
NL
168 [
169 'name' => 'restricted_access',
170 'value' => '0',
171 'section' => 'entry',
172 ],
d6ba77e8
JB
173 ];
174
175 foreach ($settings as $setting) {
176 $newSetting = new Setting();
177 $newSetting->setName($setting['name']);
178 $newSetting->setValue($setting['value']);
179 $newSetting->setSection($setting['section']);
180 $manager->persist($newSetting);
181 }
182
183 $manager->flush();
184 }
185
186 /**
187 * {@inheritdoc}
188 */
189 public function getOrder()
190 {
309e13c1 191 return 29;
d6ba77e8
JB
192 }
193}