Beispiel #1
0
 public function __construct($id = "", $content = "")
 {
     parent::__construct();
     // Set attributes
     $this->attr("value", $id);
     $this->content($content);
 }
Beispiel #2
0
 public function __construct()
 {
     parent::__construct();
     // Set attributes
     $this->attributes->method = "POST";
     $this->attributes->action = "";
     // Ensure that submitted values will be saved to the session under the current pageInstanceId
     $this->addSavePid();
     // Check if form was submitted
     // TODO: make it work with multiple forms on the page
     $this->isSubmit = !empty($_POST);
 }
Beispiel #3
0
 public function __construct($name = "", $label = "")
 {
     parent::__construct();
     // Set attributes
     $this->attr("name", $name);
     $this->label($label);
     // Load the value from the Session if possible
     if (class_exists("PageInstanceId")) {
         $pageinstance = PageInstanceId::inst();
         $vars = $pageinstance->getVarsForPageInstance();
         if (isset($vars[$name])) {
             $this->val($vars[$name]);
         }
     }
 }