mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-28 14:29:30 +01:00
35 lines
768 B
PHP
35 lines
768 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\User;
|
||
|
|
||
|
class LoadUserData extends AbstractFixture implements OrderedFixtureInterface
|
||
|
{
|
||
|
/**
|
||
|
* {@inheritDoc}
|
||
|
*/
|
||
|
public function load(ObjectManager $manager)
|
||
|
{
|
||
|
$userAdmin = new User();
|
||
|
$userAdmin->setUsername('admin');
|
||
|
$userAdmin->setPassword('test');
|
||
|
|
||
|
$manager->persist($userAdmin);
|
||
|
$manager->flush();
|
||
|
|
||
|
$this->addReference('admin-user', $userAdmin);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* {@inheritDoc}
|
||
|
*/
|
||
|
public function getOrder()
|
||
|
{
|
||
|
return 10;
|
||
|
}
|
||
|
}
|