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 Wallabag\CoreBundle\Entity\Config
;
10 class LoadConfigData
extends AbstractFixture
implements OrderedFixtureInterface
15 public function load(ObjectManager
$manager)
17 $adminConfig = new Config($this->getReference('admin-user'));
19 $adminConfig->setTheme('material');
20 $adminConfig->setItemsPerPage(30);
21 $adminConfig->setReadingSpeed(1);
22 $adminConfig->setLanguage('en');
23 $adminConfig->setPocketConsumerKey('xxxxx');
24 $adminConfig->setActionMarkAsRead(0);
25 $adminConfig->setListMode(0);
27 $manager->persist($adminConfig);
29 $this->addReference('admin-config', $adminConfig);
31 $bobConfig = new Config($this->getReference('bob-user'));
32 $bobConfig->setTheme('default');
33 $bobConfig->setItemsPerPage(10);
34 $bobConfig->setReadingSpeed(1);
35 $bobConfig->setLanguage('fr');
36 $bobConfig->setPocketConsumerKey(null);
37 $bobConfig->setActionMarkAsRead(1);
38 $bobConfig->setListMode(1);
40 $manager->persist($bobConfig);
42 $this->addReference('bob-config', $bobConfig);
44 $emptyConfig = new Config($this->getReference('empty-user'));
45 $emptyConfig->setTheme('material');
46 $emptyConfig->setItemsPerPage(10);
47 $emptyConfig->setReadingSpeed(1);
48 $emptyConfig->setLanguage('en');
49 $emptyConfig->setPocketConsumerKey(null);
50 $emptyConfig->setActionMarkAsRead(0);
51 $emptyConfig->setListMode(0);
53 $manager->persist($emptyConfig);
55 $this->addReference('empty-config', $emptyConfig);
63 public function getOrder()