/** * Load data fixtures with the passed EntityManager * * @param ObjectManager $manager */ public function load(ObjectManager $manager) { $attribute = new Attribute(); $attribute->setType(Attribute::ELEMENT)->setName('class')->setLabel('Active element')->setValue('active'); $attribute->addTranslation(new AttributeTranslation('fr', 'label', 'Element ayant la class "active"')); $manager->persist($attribute); $attribute = new Attribute(); $attribute->setType(Attribute::LINK)->setName('class')->setLabel('Active link')->setValue('active'); $attribute->addTranslation(new AttributeTranslation('fr', 'label', 'Lien ayant la class "active"')); $manager->persist($attribute); $attribute = new Attribute(); $attribute->setType(Attribute::CHILD)->setName('class')->setLabel('Active child')->setValue('active'); $attribute->addTranslation(new AttributeTranslation('fr', 'label', 'Enfant ayant la class "active"')); $manager->persist($attribute); $manager->flush(); }