Exemplo n.º 1
0
 /**
  * @return Type
  */
 public function provider()
 {
     $type = new Type();
     $type->setType('Document-type');
     $type->setInternal(Type::INTERNAL);
     $type->setView(Type::NO_VIEW);
     $type->setAdmin(Type::NOT_ADMIN);
     return [[$type]];
 }
Exemplo n.º 2
0
 /**
  * @param ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     $access = $manager->find("Admin\\Entity\\Access", 1);
     $documentType = new Type();
     $documentType->setType('PO Annex');
     $documentType->setAdmin(Type::ADMIN);
     $documentType->setInternal(Type::INTERNAL);
     $documentType->setView(Type::VIEW);
     $documentType->setAccess([$access]);
     $manager->persist($documentType);
     $manager->flush();
 }