add('name') ->add('description') ->add('enable') ->add('template') ; } /** * @param ListMapper $listMapper */ protected function configureListFields(ListMapper $listMapper) { $listMapper ->add('name') ->add('description') ->add('enable') ->add('_action', null, array( 'actions' => array( 'show' => array(), 'edit' => array(), 'delete' => array() ) )) ; } /** * @param FormMapper $formMapper */ protected function configureFormFields(FormMapper $formMapper) { $formMapper ->add('name') ->add('description') ->add('enable') ->add('type', 'choice', array('choices' => array('state_machine' => 'state_machine', 'workflow' => 'workflow'))) ->add('markingType', 'choice', array('choices' => array('single_state' => 'single_state', 'multiple_state' => 'multiple_state'))) ->add('markingName', 'choice', array('choices' => array('currentState' => 'currentState'))) ->add('template', null, array('attr' => array('style' => 'height:500px;'))) ->setHelps(array( 'name' => $this->trans("helps.workflow_label_name"), 'type' => $this->trans("helps.workflow_label_type"), 'markingType' => $this->trans("helps.workflow_label_marking_type"), 'markingName' => $this->trans("helps.workflow_label_marking_name"), )) ; } /** * @param ShowMapper $showMapper */ protected function configureShowFields(ShowMapper $showMapper) { $showMapper ->add('id') ->add('name') ->add('description') ->add('enable') ->add('created') ->add('updated') ->add('template','string', array('template' => 'WorkflowBundle:Workflow:show_template.html.twig')) ; } }