aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/DataFixtures
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-20 16:38:24 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-06 20:50:30 +0100
commit2691cf04384239c546e141af6cc3c22b210dae58 (patch)
tree0e3f7047e7edb9628139a7f344ea646f660ac14d /src/Wallabag/CoreBundle/DataFixtures
parent1d14779154481b320e1c44fccf2558d8c9fa43a1 (diff)
downloadwallabag-2691cf04384239c546e141af6cc3c22b210dae58.tar.gz
wallabag-2691cf04384239c546e141af6cc3c22b210dae58.tar.zst
wallabag-2691cf04384239c546e141af6cc3c22b210dae58.zip
GET /api/tags/id_tag method
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures')
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
new file mode 100644
index 00000000..6b13c2be
--- /dev/null
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
@@ -0,0 +1,42 @@
1<?php
2
3namespace Wallabag\CoreBundle\DataFixtures\ORM;
4
5use Doctrine\Common\DataFixtures\AbstractFixture;
6use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\CoreBundle\Entity\Tag;
9
10class 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');
19
20 $manager->persist($tag1);
21
22 $tag2 = new Tag();
23 $tag2->setLabel('bar');
24
25 $manager->persist($tag2);
26
27 $tag3 = new Tag();
28 $tag3->setLabel('baz');
29
30 $manager->persist($tag3);
31
32 $manager->flush();
33 }
34
35 /**
36 * {@inheritDoc}
37 */
38 public function getOrder()
39 {
40 return 30;
41 }
42}