내 응용 프로그램에서 마법사를 설정하기 위해 Fuelux 마법사 구성 요소를 사용하고 있습니다.SyliusFlowBundle 사용자 정의 render
public function displayAction(ProcessContextInterface $context)
{
$entity = new Producto();
$form = $this->createForm(new FirstStepFormType(), $entity);
return $this->render('RPNIBundle:Producto:_paso1.html.twig', array(
'entity' => $entity,
'form' => $form->createView())
);
}
어떻게 내가 가야 displayAction
출력을 렌더링 할 :
<div class="wizard" data-initialize="wizard" id="myWizard">
<ul class="steps">
<li data-step="1" class="active"><span class="badge">1</span>Step 1<span class="chevron"></span></li>
<li data-step="2"><span class="badge">2</span>Step 2<span class="chevron"></span></li>
<li data-step="3"><span class="badge">3</span>Step 3<span class="chevron"></span></li>
</ul>
<div class="actions">
<button class="btn btn-default btn-prev"><span class="glyphicon glyphicon-arrow-left"></span>Previous</button>
<button class="btn btn-default btn-next" data-last="Complete">Next<span class="glyphicon glyphicon-arrow-right"></span></button>
</div>
<div class="step-content">
<div class="step-pane active sample-pane" data-step="1">
// here goes the firstStep
</div>
<div class="step-pane sample-pane " data-step="2">
// here goes the secondStep
</div>
<div class="step-pane sample-pane" data-step="3">
// here goes the thirdtStep
</div>
</div>
</div>
이 ControllerStep
에 displayAction
방법은 다음과 같습니다이 내 템플릿에 HTML 마크 업인가? 이 경우 텍스트가 // here goes the firstStep
인 경우? 내 템플릿에 Previos/Next
링크를 어떻게 관리합니까?
, 나는이 오류를 받고 있어요 작업을 수행 할 수 있습니다 "단계 내력에서 발견되지 못한 아이디어"? 이것은 내가 previos/next 링크를 가지고있는 방식입니다 :'{{path ('sylius_flow_display', { 'scenarioAlias': 'RPNIScenario', 'stepName': 'first'})}}' '~ {path ('sylius_flow_forward ', {'scenarioAlias ':'RPNIScenario ','stepName ':'second '})}}'내가 항상 잘못한 것 같아요. 두 번째 단계로 이동하십시오. 어떻게 다음/이전으로 이동하고 오류를 수정하는 방법? – ReynierPM
@ReynierPM, 늦은 응답을 드려 죄송합니다. 오른쪽 링크를 얻으려면'context' 객체를 템플릿에 전달하고 링크 세대에서 사용해야합니다 :'{{path ('sylius_flow_forward', { 'scenarioAlias': 'RPNIScenario', 'stepName': context.previousStep}) 이전 단계의 링크는 같지만 다음 단계의 링크를위한'context.nextStep'을 사용하면됩니다. –
@ roma-kliuchko 지연에 대해 걱정하지 않아도, 내가 무슨 말을하고 있는지 잘 모르겠다. 내 [단계] (https://gist.github.com/paquitodev/77b6a547232f5d4a619)를 살펴볼 수 있습니까? 클래스에'context'가 어떻게 들어 맞는지 살펴 보자. – ReynierPM