와 심포니의 경로를 구성 나는 심포니 응용 프로그램에서 다음과 같은 경로 구성이 있습니다같은 URL하지만 다른 HTTP 방법과 컨트롤러 액션
label:
url: /label
param: { module: label, action: configure }
requirements: { sf_method: get }
label_create:
url: /label
param: { module: label, action: create }
requirements: { sf_method: post }
이 executeConfigure
및 executeCreate
행동에 연결합니다. 그럼 난 형태가 이런 식으로 구성되어 : 지금까지 내가 POST
방법으로 구성 경로를 알고있는 것을 방지하고 executeCreate
을 실행해야하지만 형태가 executeConfigure
제출 될 때마다
<form action="<?php echo url_for('@label_create') ?>" method="POST">
<?php echo $form->renderHiddenFields() ?>
<input type="hidden" name="sf_method" value="post" />
<!-- more stuff here -->
</form>
가 실행됩니다.
동일한 URL을 유지하는 두 작업을 어떻게 구별 할 수 있습니까?
감사합니다.
이 답변은 이전 버전의 Symfony에서는 유용하지만 현재 릴리스에서는 더 이상 사용되지 않습니다. 어떤 대안이 있습니까? –