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; }
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); $departamento = $this->em->getReference("Assistente\\Entity\\Departamento", $data['departamento']); $entity->setDepartamento($departamento); $this->em->persist($entity); $this->em->flush(); return $entity; }
public function __construct($options = null) { Configurator::configure($this, $options); $this->usuarios = new ArrayCollection(); }
public function __construct($options = null) { Configurator::configure($this, $options); $this->salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36); }