public function render($action = null, array $arguments = array(), $controller = null, $package = null, $subpackage = null, $object = null, $section = '', $format = '', array $additionalParams = array(), $absolute = false, $addQueryString = false, array $argumentsToBeExcludedFromQueryString = array(), $fieldNamePrefix = null, $actionUri = null, $objectName = null, $useParentRequest = false)
{
$this->formActionUri = null;
if ($action === null && $actionUri === null) {
throw new ViewHelper\Exception('FormViewHelper requires "actionUri" or "action" argument to be specified', 1355243748);
}
$this->tag->addAttribute('action', $this->getFormActionUri());
if (strtolower($this->arguments['method']) === 'get') {
$this->tag->addAttribute('method', 'get');
} else {
$this->tag->addAttribute('method', 'post');
}
$this->addFormObjectNameToViewHelperVariableContainer();
$this->addFormObjectToViewHelperVariableContainer();
$this->addFieldNamePrefixToViewHelperVariableContainer();
$this->addFormFieldNamesToViewHelperVariableContainer();
$this->addEmptyHiddenFieldNamesToViewHelperVariableContainer();
$formContent = $this->renderChildren();
// wrap hidden field in div container in order to create XHTML valid output
$content = chr(10) . '<div style="display: none">';
if (strtolower($this->arguments['method']) === 'get') {
$content .= $this->renderHiddenActionUriQueryParameters();
}
$content .= $this->renderHiddenIdentityField($this->arguments['object'], $this->getFormObjectName());
$content .= $this->renderAdditionalIdentityFields();
$content .= $this->renderHiddenReferrerFields();
$content .= $this->renderEmptyHiddenFields();
// Render the trusted list of all properties after everything else has been rendered
$content .= $this->renderTrustedPropertiesField();
$content .= $this->renderCsrfTokenField();
$content .= '</div>' . chr(10);
$content .= $formContent;
$this->tag->setContent($content);
$this->removeFieldNamePrefixFromViewHelperVariableContainer();
$this->removeFormObjectFromViewHelperVariableContainer();
$this->removeFormObjectNameFromViewHelperVariableContainer();
$this->removeFormFieldNamesFromViewHelperVariableContainer();
$this->removeEmptyHiddenFieldNamesFromViewHelperVariableContainer();
return $this->tag->render();
}