function __construct($Parent = null, $Label = null, $Method = jForm::Method_POST) { parent::__construct($Parent); $this->Label = $Label; $this->Method = $Method; $this->CSRFGuard(); }
/** * Add a child to this widget. * This function should not be called directly, instead send this widget as parameter to constructor * of new widgets, and they use this function to register them in their parent. * @param jWidget $Widget */ protected final function AddChild(jWidget $Widget) { $t = debug_backtrace(); if (!($t[1]['class'] == "jWidget" and $t[1]['function'] == "__construct")) { throw new Exception("Add child is implicitly called by jWidget constructors. You should not manually call it."); } if ($this->IsTerminal()) { throw new TerminalAddChildException("Widget {$this->Name()} of type " . get_class($this) . " is terminal, i.e it can not contain children."); } $this->Children[$Widget->Name()] = $Widget; }
/** * Create a form widget * @param jWidget $Parent (usually the form) * @param string $Label text of the widget */ function __construct(jWidget $Parent, $Label = null) { parent::__construct($Parent); $this->Label = $Label; }