Completed
Push — master ( c15895...5432fb )
by Peter
22:43
created

LoadPostData::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 1
eloc 8
nc 1
nop 1
1
<?php
2
3
namespace AppBundle\DataFixtures\ORM;
4
5
use Doctrine\Common\DataFixtures\FixtureInterface;
6
use Doctrine\Common\Persistence\ObjectManager;
7
use AppBundle\Entity\Post;
8
9
class LoadPostData implements FixtureInterface
10
{
11
    /**
12
     * {@inheritDoc}
13
     */
14
    public function load(ObjectManager $manager)
15
    {
16
        $post_1 = new Post();
17
        $post_1->setTitle('Welcome to the new site Symfony.si');
18
        $post_1->setIntro('New website is attended for PHP developers and users of Symfony PHP framework and for promotion of Symfony framework in Slovenia.');
19
        $post_1->setContent('Welcome to the new website Symfony.si. Page is interesting for PHP users of other frameworks and for those who have already used Symfony before. You will find useful advices and interesting information from Symfony world. Most of all you also have an opportunity to create this website along. It is open sourced and accessible on <a href="https://github.com/symfony-si/symfony.si">GitHub</a>. More Symfony information soon.
20
        ');
21
        $post_1->setSlug('welcome-to-symfony-si');
22
        $manager->persist($post_1);
23
        $manager->flush();
24
    }
25
}
26
27