]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
Merge remote-tracking branch 'origin/master' into 2.2
[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 ],
53 [
54 'name' => 'shaarli_url',
55 'value' => 'http://myshaarli.com',
56 'section' => 'entry',
57 ],
58 [
59 'name' => 'share_mail',
60 'value' => '1',
61 'section' => 'entry',
62 ],
63 [
64 'name' => 'share_twitter',
65 'value' => '1',
66 'section' => 'entry',
67 ],
68 [
69 'name' => 'export_epub',
70 'value' => '1',
71 'section' => 'export',
72 ],
73 [
74 'name' => 'export_mobi',
75 'value' => '1',
76 'section' => 'export',
77 ],
78 [
79 'name' => 'export_pdf',
80 'value' => '1',
81 'section' => 'export',
82 ],
a74a6ca2
JB
83 [
84 'name' => 'export_csv',
85 'value' => '1',
86 'section' => 'export',
87 ],
88 [
89 'name' => 'export_json',
90 'value' => '1',
91 'section' => 'export',
92 ],
93 [
94 'name' => 'export_txt',
95 'value' => '1',
96 'section' => 'export',
97 ],
98 [
99 'name' => 'export_xml',
100 'value' => '1',
101 'section' => 'export',
102 ],
40d2a294 103 [
b3437d58
JB
104 'name' => 'import_with_redis',
105 'value' => '0',
106 'section' => 'import',
107 ],
108 [
109 'name' => 'import_with_rabbitmq',
40d2a294
NL
110 'value' => '0',
111 'section' => 'import',
112 ],
d6ba77e8
JB
113 [
114 'name' => 'show_printlink',
115 'value' => '1',
116 'section' => 'entry',
117 ],
118 [
119 'name' => 'wallabag_support_url',
120 'value' => 'https://www.wallabag.org/pages/support.html',
121 'section' => 'misc',
122 ],
123 [
124 'name' => 'wallabag_url',
125 'value' => 'http://v2.wallabag.org',
126 'section' => 'misc',
127 ],
07643dde
NL
128 [
129 'name' => 'piwik_enabled',
130 'value' => '0',
131 'section' => 'analytics',
132 ],
133 [
134 'name' => 'piwik_host',
2cbf0d05 135 'value' => 'v2.wallabag.org',
07643dde
NL
136 'section' => 'analytics',
137 ],
138 [
139 'name' => 'piwik_site_id',
140 'value' => '1',
141 'section' => 'analytics',
142 ],
a4f42c59
JB
143 [
144 'name' => 'demo_mode_enabled',
145 'value' => '0',
146 'section' => 'misc',
147 ],
148 [
149 'name' => 'demo_mode_username',
150 'value' => 'wallabag',
151 'section' => 'misc',
152 ],
d1495dd0
JB
153 [
154 'name' => 'download_images_enabled',
155 'value' => '0',
aedd6ca0 156 'section' => 'misc',
d1495dd0 157 ],
d64bf795
NL
158 [
159 'name' => 'restricted_access',
160 'value' => '0',
161 'section' => 'entry',
162 ],
d6ba77e8
JB
163 ];
164
165 foreach ($settings as $setting) {
166 $newSetting = new Setting();
167 $newSetting->setName($setting['name']);
168 $newSetting->setValue($setting['value']);
169 $newSetting->setSection($setting['section']);
170 $manager->persist($newSetting);
171 }
172
173 $manager->flush();
174 }
175
176 /**
177 * {@inheritdoc}
178 */
179 public function getOrder()
180 {
309e13c1 181 return 29;
d6ba77e8
JB
182 }
183}