3 namespace Wallabag\CoreBundle\DataFixtures\ORM
;
5 use Doctrine\Common\DataFixtures\AbstractFixture
;
6 use Doctrine\Common\DataFixtures\OrderedFixtureInterface
;
7 use Doctrine\Common\Persistence\ObjectManager
;
8 use Craue\ConfigBundle\Entity\Setting
;
10 class LoadSettingData
extends AbstractFixture
implements OrderedFixtureInterface
15 public function load(ObjectManager
$manager)
19 'name' => 'share_public',
29 'name' => 'share_diaspora',
34 'name' => 'diaspora_url',
35 'value' => 'http://diasporapod.com',
39 'name' => 'share_unmark',
44 'name' => 'unmark_url',
45 'value' => 'https://unmark.it',
49 'name' => 'share_shaarli',
54 'name' => 'share_scuttle',
59 'name' => 'shaarli_url',
60 'value' => 'http://myshaarli.com',
64 'name' => 'scuttle_url',
65 'value' => 'http://scuttle.org',
69 'name' => 'share_mail',
74 'name' => 'share_twitter',
79 'name' => 'export_epub',
81 'section' => 'export',
84 'name' => 'export_mobi',
86 'section' => 'export',
89 'name' => 'export_pdf',
91 'section' => 'export',
94 'name' => 'export_csv',
96 'section' => 'export',
99 'name' => 'export_json',
101 'section' => 'export',
104 'name' => 'export_txt',
106 'section' => 'export',
109 'name' => 'export_xml',
111 'section' => 'export',
114 'name' => 'import_with_redis',
116 'section' => 'import',
119 'name' => 'import_with_rabbitmq',
121 'section' => 'import',
124 'name' => 'show_printlink',
126 'section' => 'entry',
129 'name' => 'wallabag_support_url',
130 'value' => 'https://www.wallabag.org/pages/support.html',
134 'name' => 'wallabag_url',
135 'value' => 'http://v2.wallabag.org',
139 'name' => 'piwik_enabled',
141 'section' => 'analytics',
144 'name' => 'piwik_host',
145 'value' => 'v2.wallabag.org',
146 'section' => 'analytics',
149 'name' => 'piwik_site_id',
151 'section' => 'analytics',
154 'name' => 'demo_mode_enabled',
159 'name' => 'demo_mode_username',
160 'value' => 'wallabag',
164 'name' => 'download_images_enabled',
169 'name' => 'restricted_access',
171 'section' => 'entry',
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);
189 public function getOrder()