private function createEditForm(MessageType $entity)
    {
        $form = $this->createForm(MessageTypeType::class, $entity, array(
            'action' => $this->generateUrl('messagetype_update', array('id' => $entity->getId())),
            'method' => 'PUT',
        ));
        $this->_addFunctionsToForm($form);

        $form->add('submit', SubmitType::class, array('label' => 'Update'));
        return $form;
    }