public function load(ObjectManager $manager)
 {
     $data = $this->container->get('ilioscore.dataloader.learningMaterialUserRole')->getAll();
     foreach ($data as $arr) {
         $entity = new LearningMaterialUserRole();
         $entity->setId($arr['id']);
         $entity->setTitle($arr['title']);
         $manager->persist($entity);
         $this->addReference('learningMaterialUserRoles' . $arr['id'], $entity);
     }
     $manager->flush();
 }
Ejemplo n.º 2
0
 /**
  * @covers Ilios\CoreBundle\Entity\LearningMaterialUserRole::__construct
  */
 public function testConstructor()
 {
     $this->assertEmpty($this->object->getLearningMaterials());
 }