blob: 679eff7de91e7df760221eeff8fe077f2dc306d0 (
plain) (
tree)
|
|
<?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,
];
}
}
|