<commit_before><?php

namespace Skaphandrus\AppBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

use Skaphandrus\AppBundle\Entity\SkIdentificationGroup;
use Skaphandrus\AppBundle\Form\SkIdentificationGroupType;

/**
 * SkIdentificationGroup controller.
 *
 */
class SkIdentificationGroupController extends Controller
{

    /**
     * Lists all SkIdentificationGroup entities.
     *
     */
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        $entities = $em->getRepository('SkaphandrusAppBundle:SkIdentificationGroup')->findAll();

        return $this->render('SkaphandrusAppBundle:SkIdentificationGroup:index.html.twig', array(
            'entities' => $entities,
        ));
    }
    /**
     * Creates a new SkIdentificationGroup entity.
     *
     */
    public function createAction(Request $request)
    {
        $entity = new SkIdentificationGroup();
        $form = $this->createCreateForm($entity);
        $form->handleRequest($request);

        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($entity);
            $em->flush();

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

        return $this->render('SkaphandrusAppBundle:SkIdentificationGroup:new.html.twig', array(
            'entity' => $entity,
            'form'   => $form->createView(),
        ));
    }

    /**
     * Creates a form to create a SkIdentificationGroup entity.
     *
     * @param SkIdentificationGroup $entity The entity
     *
     * @return \Symfony\Component\Form\Form The form
     */
    private function createCreateForm(SkIdentificationGroup $entity)
    {
        $form = $this->createForm(new SkIdentificationGroupType(), $entity, array(
            'action' => $this->generateUrl('identification_group_admin_create'),
            'method' => 'POST',
        ));

        //$form->add('submit', 'submit', array('label' => 'Create'));

        return $form;
    }

    /**
     * Displays a form to create a new SkIdentificationGroup entity.
     *
     */
    public function newAction()
    {
        $entity = new SkIdentificationGroup();
        $form   = $this->createCreateForm($entity);

        return $this->render('SkaphandrusAppBundle:SkIdentificationGroup:new.html.twig', array(
            'entity' => $entity,
            'form'   => $form->createView(),
        ));
    }

    /**
     * Finds and displays a SkIdentificationGroup entity.
     *
     */
    public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('SkaphandrusAppBundle:SkIdentificationGroup')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find SkIdentificationGroup entity.');
        }

        $deleteForm = $this->createDeleteForm($id);

        return $this->render('SkaphandrusAppBundle:SkIdentificationGroup:show.html.twig', array(
            'entity'      => $entity,
            'delete_form' => $deleteForm->createView(),
        ));
    }

    /**
     * Displays a form to edit an existing SkIdentificationGroup entity.
     *
     */
    public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('SkaphandrusAppBundle:SkIdentificationGroup')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find SkIdentificationGroup entity.');
        }

        $editForm = $this->createEditForm($entity);
        $deleteForm = $this->createDeleteForm($id);<commit_msg>identification group show<commit_after><?php

namespace Skaphandrus\AppBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

use Skaphandrus\AppBundle\Entity\SkIdentificationGroup;
use Skaphandrus\AppBundle\Form\SkIdentificationGroupType;

/**
 * SkIdentificationGroup controller.
 *
 */
class SkIdentificationGroupController extends Controller
{

    /**
     * Lists all SkIdentificationGroup entities.
     *
     */
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        $entities = $em->getRepository('SkaphandrusAppBundle:SkIdentificationGroup')->findAll();

        return $this->render('SkaphandrusAppBundle:SkIdentificationGroup:index.html.twig', array(
            'entities' => $entities,
        ));
    }
    /**
     * Creates a new SkIdentificationGroup entity.
     *
     */
    public function createAction(Request $request)
    {
        $entity = new SkIdentificationGroup();
        $form = $this->createCreateForm($entity);
        $form->handleRequest($request);

        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($entity);
            $em->flush();

                 ##@LM
            $this->get('session')->getFlashBag()->add('notice', 'form.common.message.changes_saved');
            
            return $this->redirect($this->generateUrl('identification_group_admin_edit', array('id' => $entity->getId())));
        }

        return $this->render('SkaphandrusAppBundle:SkIdentificationGroup:new.html.twig', array(
            'entity' => $entity,
            'form'   => $form->createView(),
        ));
    }

    /**
     * Creates a form to create a SkIdentificationGroup entity.
     *
     * @param SkIdentificationGroup $entity The entity
     *
     * @return \Symfony\Component\Form\Form The form
     */
    private function createCreateForm(SkIdentificationGroup $entity)
    {
        $form = $this->createForm(new SkIdentificationGroupType(), $entity, array(
            'action' => $this->generateUrl('identification_group_admin_create'),
            'method' => 'POST',
        ));

        //$form->add('submit', 'submit', array('label' => 'Create'));

        return $form;
    }

    /**
     * Displays a form to create a new SkIdentificationGroup entity.
     *
     */
    public function newAction()
    {
        $entity = new SkIdentificationGroup();
        $form   = $this->createCreateForm($entity);

        return $this->render('SkaphandrusAppBundle:SkIdentificationGroup:new.html.twig', array(
            'entity' => $entity,
            'form'   => $form->createView(),
        ));
    }

    /**
     * Finds and displays a SkIdentificationGroup entity.
     *
     */
//    public function showAction($id)
//    {
//        $em = $this->getDoctrine()->getManager();
//
//        $entity = $em->getRepository('SkaphandrusAppBundle:SkIdentificationGroup')->find($id);
//
//        if (!$entity) {
//            throw $this->createNotFoundException('Unable to find SkIdentificationGroup entity.');
//        }
//
//        $deleteForm = $this->createDeleteForm($id);
//
//        return $this->render('SkaphandrusAppBundle:SkIdentificationGroup:show.html.twig', array(
//            'entity'      => $entity,
//            'delete_form' => $deleteForm->createView(),
//        ));
//    }

    /**
     * Displays a form to edit an existing SkIdentificationGroup entity.
     *
     */
    public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('SkaphandrusAppBundle:SkIdentificationGroup')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find SkIdentificationGroup entity.');
        }

        $editForm = $this->createEditForm($entity);
        $deleteForm = $this->createDeleteForm($id);
{'fraction_non_alphanumeric': 0.1441359626362221, 'fraction_numerical': 0.0, 'mean_word_length': 2.612464854732896, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 104, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3142164', 'n_tokens_mistral': 2161, 'n_tokens_neox': 2141, 'n_words': 370}