mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-02 08:56:53 +01:00
35 lines
822 B
PHP
35 lines
822 B
PHP
|
<?php
|
||
|
|
||
|
namespace Wallabag\CoreBundle\DataFixtures\ORM;
|
||
|
|
||
|
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||
|
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||
|
use Doctrine\Common\Persistence\ObjectManager;
|
||
|
use Wallabag\CoreBundle\Entity\SiteCredential;
|
||
|
|
||
|
class LoadSiteCredentialData extends AbstractFixture implements OrderedFixtureInterface
|
||
|
{
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
*/
|
||
|
public function load(ObjectManager $manager)
|
||
|
{
|
||
|
$credential = new SiteCredential($this->getReference('admin-user'));
|
||
|
$credential->setHost('example.com');
|
||
|
$credential->setUsername('foo');
|
||
|
$credential->setPassword('bar');
|
||
|
|
||
|
$manager->persist($credential);
|
||
|
|
||
|
$manager->flush();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
*/
|
||
|
public function getOrder()
|
||
|
{
|
||
|
return 50;
|
||
|
}
|
||
|
}
|