public function newAction()
    {
        $entity = new Feature();

        if ($this->getRequest()->query->has('category')) {
            $em = $this->getDoctrine()->getManager();

            $category = $em->getRepository('EcommerceBundle:Category')->
                find($this->getRequest()->query->get('category'));

            $entity->setCategory($category);
        }

        $form   = $this->createForm(new FeatureType(), $entity);

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