Created
January 17, 2015 12:23
-
-
Save hidenorigoto/2b017c742ae2f80230c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Class AddMultiController | |
* | |
* @Route("/bill") | |
*/ | |
class EditMultiController extends UsecaseController | |
{ | |
const ROUTE_INPUT = 'xnni_bill_editmulti_input'; | |
const ROUTE_CONFIRMATION = 'xnni_bill_editmulti_confirmation'; | |
const ROUTE_LIST = 'xnni_construction_receipt_check_search'; | |
/** | |
* @var | |
* @DI\Inject("xnni.bill_bundle.use_case.bill.edit_multi") | |
*/ | |
protected $useCase; | |
/** | |
* inputAction | |
* | |
* @Route("/{id}/edit") | |
* @ParamConverter("Bill", class="XnniBillBundle:Bill", options={"with_context"=true}) | |
* @Method("get") | |
* @Template() | |
*/ | |
public function inputAction(Bill $bill) | |
{ | |
return parent::inputActionBody($bill); | |
} | |
/** | |
* inputPostAction | |
* | |
* @Route("/{id}/edit") | |
* @ParamConverter("Bill", class="XnniBillBundle:Bill", options={"with_context"=true}) | |
* @Method("post") | |
* @Template("XnniBillBundle:EditMulti:input.html.twig") | |
*/ | |
public function inputPostAction(Bill $bill) | |
{ | |
return parent::inputPostActionBody($bill); | |
} | |
/** | |
* createForm | |
* | |
* @param $data | |
* @return FormInterface | |
*/ | |
protected function createForm(Bill $data) | |
{ | |
return $this->formFactory->createBuilder('bill', $data, [ | |
'validation_groups' => ['bill', 'addmulti_bill', 'addmulti_bill_detail'] | |
])->getForm(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment