public function delete($id) { if (!$this->tableGateway->delete(['id' => $id])) { return new ApiProblem(500, 'Erro ao excluir registro.'); } return true; }
public function delete($id) { if ($this->find($id)) { return $this->tableGateway->delete(['id' => (int) $id]); } return false; }
/** * Delete one resouce */ public function delete($id) { if (!$id) { return new ApiProblem(415, "Unsupported Media Type"); } $this->tableGateway->delete(['id' => (int) $id]); return true; }
public function delete($id) { $this->find($id); try { $this->tableGateway->delete(['id' => (int) $id]); return true; } catch (\Exception $e) { throw new \Exception('Could not delete the entity.', 500); } }
public function delete($id) { $existe = $this->tableGateway->select(['id' => (int) $id]); if (count($existe) === 1) { $this->tableGateway->delete(['id' => (int) $id]); $existe = $this->tableGateway->select(['id' => (int) $id]); if (count($existe) === 1) { return new ApiProblem(450, 'Não foi possivel excluir o registro', null, 'Problemas ao excluir'); } return true; } return new ApiProblem(451, 'O registro não foi encontrado na base de dados', null, 'Registro não encontrado'); }
public function deleteItem($id) { //Eu tinha feito delete on cascade no banco anteriormente. Por isso não tinha implementado esse metodo aqui. $result = $this->orderItemTableGateway->delete(['order_id' => (int) $id]); return $result; }
public function delete($id) { $this->tableGateway->delete(['id' => (int) $id]); return true; }
public function delete($id) { $deletar = $this->tableGateway->delete(['id' => (int) $id]); return $deletar; }
/** * Delete an existing resource. * * @param int|string $id Identifier of resource. * @return bool */ public function delete($id) { $item = $this->table->delete([$this->identifierName => $id]); return $item > 0; }