Elcodi\Plugin\StoreSetupWizardBundle\Templating\TwigRenderer::renderGoNextStepMessage PHP Method

renderGoNextStepMessage() public method

Render the next step message.
public renderGoNextStepMessage ( Elcodi\Component\Plugin\EventDispatcher\Interfaces\EventInterface $event )
$event Elcodi\Component\Plugin\EventDispatcher\Interfaces\EventInterface The event
    public function renderGoNextStepMessage(EventInterface $event)
    {
        if ($this->plugin->isUsable()) {
            $masterRequest = $this->requestStack->getMasterRequest();
            $currentRoute = $masterRequest->attributes->get('_route');
            $isWizardRoute = $this->wizardRoutes->isWizardSetupRoute($currentRoute);
            $isWizardFinished = $this->wizardStatus->isWizardFinished();
            if ($isWizardRoute && !$isWizardFinished) {
                $currentStep = $this->wizardRoutes->getStepByRoute($currentRoute);
                $isStepFinished = $this->wizardStatus->isStepFinished($currentStep);
                if (1 != $currentStep && $isStepFinished) {
                    $stepsFinished = $this->wizardStatus->getStepsFinishStatus();
                    $activeStep = $this->wizardStatus->getNextStep();
                    $firstCarrier = $this->carrierRepository->findOneBy(['enabled' => true], ['id' => 'ASC']);
                    $firstCarrier = $firstCarrier instanceof CarrierInterface ? $firstCarrier : false;
                    $this->appendTemplate('@ElcodiStoreSetupWizard/Wizard/wizard.html.twig', $event, $this->plugin, ['stepsFinished' => $stepsFinished, 'activeStep' => $activeStep, 'isMiniWizard' => true, 'carrier' => $firstCarrier]);
                }
            }
        }
    }