mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-05 18:41:02 +00:00
relation between tags and entries
This commit is contained in:
parent
6c87418ff0
commit
46bbd8d321
7 changed files with 60 additions and 148 deletions
|
@ -6,6 +6,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture;
|
|||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
|
||||
class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
|
||||
{
|
||||
|
@ -37,6 +38,14 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
|
|||
$entry3->setTitle('test title entry3');
|
||||
$entry3->setContent('This is my content /o/');
|
||||
|
||||
$tag1 = new Tag();
|
||||
$tag1->setLabel("foo");
|
||||
$tag2 = new Tag();
|
||||
$tag2->setLabel("bar");
|
||||
|
||||
$entry3->addTag($tag1);
|
||||
$entry3->addTag($tag2);
|
||||
|
||||
$manager->persist($entry3);
|
||||
|
||||
$this->addReference('entry3', $entry3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue