public function createAction(Request $request)
    {
        $warehouse = new Warehouse();
        $form = $this->createForm(WarehouseType::class, $warehouse);
        if ($form->handleRequest($request)->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($warehouse);
            $em->flush();

            return $this->redirect($this->generateUrl('admin_warehouse_show', array('id' => $warehouse->getId())));
        }

        return array(
            'warehouse' => $warehouse,
            'form' => $form->createView(),
        );
    }