fireRenderEvents() public method

Must be called before form is rendered and render() is not used.
public fireRenderEvents ( ) : void
return void
Example #1
0
 /**
  * Renders form begin.
  * @return string
  */
 public static function renderFormBegin(Form $form, array $attrs, $withTags = TRUE)
 {
     $form->fireRenderEvents();
     foreach ($form->getControls() as $control) {
         $control->setOption('rendered', FALSE);
     }
     $el = $form->getElementPrototype();
     $el->action = (string) $el->action;
     $el = clone $el;
     if ($form->isMethod('get')) {
         $el->action = preg_replace('~\\?[^#]*~', '', $el->action, 1);
     }
     $el->addAttributes($attrs);
     return $withTags ? $el->startTag() : $el->attributes();
 }