forked from wallabag/wallabag
Add new Ignore Origin rules tab, update ConfigController
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
@ -0,0 +1,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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user