Cake\View\Helper\FormHelper::end PHP Метод

end() публичный Метод

Closes an HTML form, cleans up values set by FormHelper::create(), and writes hidden input fields where appropriate.
public end ( array $secureAttributes = [] ) : string
$secureAttributes array Secure attributes which will be passed as HTML attributes into the hidden input elements generated for the Security Component.
Результат string A closing FORM tag.
    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;
    }

Usage Example

Пример #1
0
 /**
  * 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);
 }
All Usage Examples Of Cake\View\Helper\FormHelper::end