add('name') ->add('workflowType') ->add('workflowName') ->add('objectClass') ->add('event') ->add('template') ; } /** * @param ListMapper $listMapper */ protected function configureListFields(ListMapper $listMapper) { $listMapper ->add('name') ->add('workflowType') ->add('workflowName') ->add('objectClass') ->add('event') ->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('workflowType', 'choice', array('choices' => array('state_machine' => 'state_machine', 'workflow' => 'workflow'))) ->add('workflowName') ->add('objectClass', 'choice', array('choices' => array('FTTHBundle\Entity\ONU' => 'FTTHBundle\Entity\ONU', 'FTTHBundle\Entity\OLT' => 'FTTHBundle\Entity\OLT'))) ->add('event', 'choice', array('choices' => array('transition' => 'transition', 'leave' => 'leave', 'enter' => 'enter', 'guard' => 'guard'))) ->add('eventReference') ->add('template', null, array('attr' => array('style' => 'height:500px;'))) ->setHelps(array( 'workflowType' => $this->trans("helps.action_label_workflow_type"), '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('workflowType') ->add('workflowName') ->add('objectClass') ->add('event') ->add('eventReference') ->add('template','string', array('template' => 'WorkflowBundle:Action:show_template.html.twig')) ; } }