public function renderForm(SummaryFormInterface $form, $layout = Form::LAYOUT_HORIZONTAL, $parameter = array())
    {
        /* @var $form SummaryFormInterface|\Core\Form\SummaryForm */
        $renderer     = $this->getView();           /* @var $renderer \Zend\View\Renderer\PhpRenderer */
        $formHelper   = $renderer->plugin('form');  /* @var $formHelper \Core\Form\View\Helper\Form */
        $fieldset     = $form->getBaseFieldset();
        $resetPartial = false;

        if ($fieldset instanceof ViewPartialProviderInterface) {
            $origPartial = $fieldset->getViewPartial();
            $partial     = "$origPartial.form";
            if ($renderer->resolver($partial)) {
                $fieldset->setViewPartial($partial);
                $resetPartial = true;
            }
        }

        $markup = $formHelper->renderBare($form, $layout, $parameter);

        if ($resetPartial) {
            /** @noinspection PhpUndefinedVariableInspection */
            $fieldset->setViewPartial($origPartial);
        }

        return $markup;
    }