blob: 679eff7de91e7df760221eeff8fe077f2dc306d0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
namespace Wallabag\CoreBundle\DataFixtures;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
use Wallabag\UserBundle\DataFixtures\UserFixtures;
class IgnoreOriginUserRuleFixtures extends Fixture implements DependentFixtureInterface
{
/**
* {@inheritdoc}
*/
public function load(ObjectManager $manager)
{
$rule = new IgnoreOriginUserRule();
$rule->setRule('host = "example.fr"');
$rule->setConfig($this->getReference('admin-user')->getConfig());
$manager->persist($rule);
$manager->flush();
}
/**
* {@inheritdoc}
*/
public function getDependencies()
{
return [
UserFixtures::class,
];
}
}
|