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_shaarli',
44 'name' => 'shaarli_url',
45 'value' => 'http://myshaarli.com',
49 'name' => 'share_mail',
54 'name' => 'share_twitter',
59 'name' => 'export_epub',
61 'section' => 'export',
64 'name' => 'export_mobi',
66 'section' => 'export',
69 'name' => 'export_pdf',
71 'section' => 'export',
74 'name' => 'export_csv',
76 'section' => 'export',
79 'name' => 'export_json',
81 'section' => 'export',
84 'name' => 'export_txt',
86 'section' => 'export',
89 'name' => 'export_xml',
91 'section' => 'export',
94 'name' => 'import_with_redis',
96 'section' => 'import',
99 'name' => 'import_with_rabbitmq',
101 'section' => 'import',
104 'name' => 'show_printlink',
106 'section' => 'entry',
109 'name' => 'wallabag_support_url',
110 'value' => 'https://www.wallabag.org/pages/support.html',
114 'name' => 'wallabag_url',
115 'value' => 'http://v2.wallabag.org',
119 'name' => 'piwik_enabled',
121 'section' => 'analytics',
124 'name' => 'piwik_host',
125 'value' => 'v2.wallabag.org',
126 'section' => 'analytics',
129 'name' => 'piwik_site_id',
131 'section' => 'analytics',
134 'name' => 'demo_mode_enabled',
139 'name' => 'demo_mode_username',
140 'value' => 'wallabag',
144 'name' => 'download_images_enabled',
146 'section' => 'image',
149 'name' => 'download_images_with_rabbitmq',
151 'section' => 'image',
154 'name' => 'download_images_with_redis',
156 'section' => 'image',
160 foreach ($settings as $setting) {
161 $newSetting = new Setting();
162 $newSetting->setName($setting['name']);
163 $newSetting->setValue($setting['value']);
164 $newSetting->setSection($setting['section']);
165 $manager->persist($newSetting);
174 public function getOrder()