/**
  * Remove a group type
  * @param GroupType $groupType
  *
  * @AclAncestor("pim_enrich_group_type_remove")
  * @return Response|RedirectResponse
  */
 public function removeAction(GroupType $groupType)
 {
     if ($groupType->isVariant()) {
         throw new DeleteException($this->getTranslator()->trans('flash.group type.cant remove variant'));
     } elseif (count($groupType->getGroups()) > 0) {
         throw new DeleteException($this->getTranslator()->trans('flash.group type.cant remove used'));
     } else {
         $this->remove($groupType);
     }
     if ($this->getRequest()->isXmlHttpRequest()) {
         return new Response('', 204);
     } else {
         return $this->redirectToRoute('pim_enrich_group_type_index');
     }
 }
 /**
  * {@inheritDoc}
  */
 public function isVariant()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'isVariant', array());
     return parent::isVariant();
 }