mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
37 lines
875 B
PHP
37 lines
875 B
PHP
|
<?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,
|
||
|
];
|
||
|
}
|
||
|
}
|