3 namespace Wallabag\AnnotationBundle\DataFixtures\ORM
;
5 use Doctrine\Common\DataFixtures\AbstractFixture
;
6 use Doctrine\Common\DataFixtures\OrderedFixtureInterface
;
7 use Doctrine\Common\Persistence\ObjectManager
;
8 use Wallabag\AnnotationBundle\Entity\Annotation
;
10 class LoadAnnotationData
extends AbstractFixture
implements OrderedFixtureInterface
15 public function load(ObjectManager
$manager)
17 $annotation1 = new Annotation($this->getReference('admin-user'));
18 $annotation1->setEntry($this->getReference('entry1'));
19 $annotation1->setText('This is my annotation /o/');
20 $annotation1->setQuote('content');
22 $manager->persist($annotation1);
24 $this->addReference('annotation1', $annotation1);
26 $annotation2 = new Annotation($this->getReference('admin-user'));
27 $annotation2->setEntry($this->getReference('entry2'));
28 $annotation2->setText('This is my 2nd annotation /o/');
29 $annotation2->setQuote('content');
31 $manager->persist($annotation2);
33 $this->addReference('annotation2', $annotation2);
41 public function getOrder()