3 namespace Wallabag\CoreBundle\DataFixtures\ORM
;
5 use Doctrine\Common\DataFixtures\AbstractFixture
;
6 use Doctrine\Common\DataFixtures\OrderedFixtureInterface
;
7 use Doctrine\Common\Persistence\ObjectManager
;
8 use Wallabag\CoreBundle\Entity\Tag
;
10 class LoadTagData
extends AbstractFixture
implements OrderedFixtureInterface
15 public function load(ObjectManager
$manager)
18 $tag1->setLabel('foo bar');
20 $manager->persist($tag1);
22 $this->addReference('foo-bar-tag', $tag1);
25 $tag2->setLabel('bar');
27 $manager->persist($tag2);
29 $this->addReference('bar-tag', $tag2);
32 $tag3->setLabel('baz');
34 $manager->persist($tag3);
36 $this->addReference('baz-tag', $tag3);
39 $tag4->setLabel('foo');
41 $manager->persist($tag4);
43 $this->addReference('foo-tag', $tag4);
51 public function getOrder()