public function end(array $secureAttributes = [])
{
$out = '';
if ($this->requestType !== 'get' && !empty($this->request['_Token'])) {
$out .= $this->secure($this->fields, $secureAttributes);
$this->fields = [];
$this->_unlockedFields = [];
}
$out .= $this->formatTemplate('formEnd', []);
$this->templater()->pop();
$this->requestType = null;
$this->_context = null;
$this->_idPrefix = $this->config('idPrefix');
return $out;
}
/** * Closes an HTML form, cleans up values set by FormHelper::create(), and writes hidden * input fields where appropriate. * * Overrides parent method to reset the form alignment and grid size. * * @param array $secureAttributes Secure attributes which will be passed as HTML attributes * into the hidden input elements generated for the Security Component. * @return string A closing FORM tag. */ public function end(array $secureAttributes = []) { $this->_align = $this->_grid = null; return parent::end($secureAttributes); }