diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php')
-rw-r--r-- | src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php deleted file mode 100644 index 0ecfd18b..00000000 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\DataFixtures\ORM; | ||
4 | |||
5 | use Doctrine\Common\DataFixtures\AbstractFixture; | ||
6 | use Doctrine\Common\DataFixtures\OrderedFixtureInterface; | ||
7 | use Doctrine\Common\Persistence\ObjectManager; | ||
8 | use Wallabag\CoreBundle\Entity\Tag; | ||
9 | |||
10 | class LoadTagData extends AbstractFixture implements OrderedFixtureInterface | ||
11 | { | ||
12 | /** | ||
13 | * {@inheritdoc} | ||
14 | */ | ||
15 | public function load(ObjectManager $manager) | ||
16 | { | ||
17 | $tag1 = new Tag(); | ||
18 | $tag1->setLabel('foo bar'); | ||
19 | |||
20 | $manager->persist($tag1); | ||
21 | |||
22 | $this->addReference('foo-bar-tag', $tag1); | ||
23 | |||
24 | $tag2 = new Tag(); | ||
25 | $tag2->setLabel('bar'); | ||
26 | |||
27 | $manager->persist($tag2); | ||
28 | |||
29 | $this->addReference('bar-tag', $tag2); | ||
30 | |||
31 | $tag3 = new Tag(); | ||
32 | $tag3->setLabel('baz'); | ||
33 | |||
34 | $manager->persist($tag3); | ||
35 | |||
36 | $this->addReference('baz-tag', $tag3); | ||
37 | |||
38 | $tag4 = new Tag(); | ||
39 | $tag4->setLabel('foo'); | ||
40 | |||
41 | $manager->persist($tag4); | ||
42 | |||
43 | $this->addReference('foo-tag', $tag4); | ||
44 | |||
45 | $manager->flush(); | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | * {@inheritdoc} | ||
50 | */ | ||
51 | public function getOrder() | ||
52 | { | ||
53 | return 25; | ||
54 | } | ||
55 | } | ||