<?php
/**
 * Created by PhpStorm.
 * User: vlade
 * Date: 9/15/14
 * Time: 2:13 PM
 */

namespace VGM\WOBundle\DataFixtures\ORM;

use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use VGM\WOBundle\Entity\WorkType;


class loadWorkTypeData extends AbstractFixture implements OrderedFixtureInterface
{
    public function load(ObjectManager $em)
    {
        /*$p1 = new WorkType();
        $p1->setDescription('Description 1');
        $p1->setWorkType('Xa Partes');

        $p2 = new WorkType();
        $p2->setDescription('Description 2');
        $p2->setWorkType('Xa Renta');

        $p3 = new WorkType();
        $p3->setDescription('Description 3');
        $p3->setWorkType('Operative');

        $p4 = new WorkType();
        $p4->setDescription('Description 4');
        $p4->setWorkType('Recond');

        $p5 = new WorkType();
        $p5->setDescription('Description 5');
        $p5->setWorkType('Overhaul');

        $em->persist($p1);
        $em->persist($p2);
        $em->persist($p3);
        $em->persist($p4);
        $em->persist($p5);

        $em->flush();*/
    }

    public function getOrder()
    {
        return 1; // the order in which fixtures will be loaded
    }
}