add('name') ->add('workflowName') ->add('objectClass') ->add('event') ; } /** * @param ListMapper $listMapper */ protected function configureListFields(ListMapper $listMapper) { $listMapper ->add('name') ->add('workflowName') ->add('objectClass') ->add('event', 'html', array( 'template' => 'BaseAdminBundle:Utils:badge_field.html.twig', )) ->add('eventReference') ->add('_action', null, array( 'actions' => array( 'show' => array(), 'edit' => array(), 'delete' => array(), ) )) ; } /** * @param FormMapper $formMapper */ protected function configureFormFields(FormMapper $formMapper) { $formMapper ->add('name') ->add('event', ChoiceType::class, array( 'choices' => array( 'WorkFlow' => WorkFlowEvents::getChoices(), 'Doctrine' => DoctrineEvents::getDoctrineEventChoices(), ), 'required' => false, 'multiple' => true, ) ) ->add('workflowName', TextType::class, array( 'required' => false, )) ->add('eventReference', TextType::class, array( 'required' => false, )) ->add('objectClass', ChoiceType::class, array( 'choices' => array_filter(WorkFlowEntityClasses::getChoices(), 'class_exists'), 'required' => false, ) ) ->add('template', null, array( 'attr' => array( 'style' => 'height:500px;', ), ) ) ->setHelps(array( 'workflowName' => $this->trans("helps.action_label_workflow_name"), 'name' => $this->trans("helps.action_label_name"), 'objectClass' => $this->trans("helps.action_label_object_class"), 'event' => $this->trans("helps.action_label_event"), 'eventReference' => $this->trans("helps.action_label_event_reference"), 'template' => $this->trans("helps.action_label_template"), ) ) ; } /** * @param ShowMapper $showMapper */ protected function configureShowFields(ShowMapper $showMapper) { $showMapper ->add('id') ->add('name') ->add('workflowName') ->add('objectClass') ->add('event', 'string', array( 'template' => 'BaseAdminBundle:Utils:badge_field.html.twig', )) ->add('eventReference') ->add('template','string', array( 'template' => 'WorkflowBundle:Action:show_template.html.twig', )) ; $this->parameters = array( 'template_type' => 'show', ); } }