Esempio n. 1
0
 /**
  * File constructor: initialize attributes with some default values
  *
  * @param string $id
  */
 public function __construct(string $id)
 {
     parent::__construct($id);
     $this->setMaxSize($this->getSystemMaxSize());
 }
Esempio n. 2
0
 /**
  * Adds a control in the form array
  *
  * @param Control $control
  * @return Form
  */
 public function addControl(Control $control) : self
 {
     # When attaching a control to a form, set the id of this form as parent of the control
     $control->setParent($this->id);
     # Adding to the controls array
     $this->controls[$control->getId()] = $control;
     return $this;
 }