Ejemplo n.º 1
0
 public function update(array $data)
 {
     $entity = $this->em->getReference($this->entity, $data['id']);
     $entity = Configurator::configure($entity, $data);
     $this->em->persist($entity);
     $this->em->flush();
     return $entity;
 }
Ejemplo n.º 2
0
 public function update(array $data)
 {
     $entity = $this->em->getReference($this->entity, $data['id']);
     if (empty($data['password'])) {
         unset($data['password']);
     }
     $entity = Configurator::configure($entity, $data);
     $this->em->persist($entity);
     $this->em->flush();
 }
Ejemplo n.º 3
0
 public function update(array $data)
 {
     $entity = $this->em->getReference($this->entity, $data['id']);
     $entity = Configurator::configure($entity, $data);
     $categoria = $this->em->getReference("Livraria\\Entity\\Categoria", $data['categoria']);
     $entity->setCategoria($categoria);
     $this->em->persist($entity);
     $this->em->flush();
     return $entity;
 }
Ejemplo n.º 4
0
 public function __construct($options = null)
 {
     Configurator::configure($this, $options);
 }
Ejemplo n.º 5
0
 public function __construct($options = null)
 {
     Configurator::configure($this, $options);
     $this->salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);
 }
Ejemplo n.º 6
0
 public function __construct($options = null)
 {
     Configurator::configure($this, $options);
     $this->livros = new ArrayCollection();
 }