Beispiel #1
0
 /**
  * @param string $name Object name (identifier)
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->build("P4A_Collection", "pages");
     $this->addAjaxAction("onclick");
     $this->intercept($this, "onclick", "tabClick");
 }
Beispiel #2
0
 /**
  * @param string $name Mnemonic identifier for the object
  * @param string $id Object ID, if not specified will be generated
  */
 public function __construct($name, $id = null)
 {
     $prefix = 'line';
     if ($id === null) {
         parent::__construct($name, $prefix);
     } else {
         parent::__construct($name, $prefix, $id);
     }
 }
Beispiel #3
0
 public function __construct($name, $rows = 0, $cols = 0)
 {
     parent::__construct($name = null);
     $this->_rows = $rows;
     $this->_cols = $cols;
     for ($i = 1; $i <= $rows; $i++) {
         $this->_map[$i] = array();
         for ($j = 1; $j <= $cols; $j++) {
             $this->_map[$i][$j] = null;
         }
     }
 }
Beispiel #4
0
 /**
  * @param string $name
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->addAction('onclick');
     $this->intercept($this, 'onclick', 'onClick');
 }
Beispiel #5
0
 /**
  * @param string $name Mnemonic identifier for the object.
  * @param string $add_default_data_field If it's false the widget doesn't instance a default data_field. You must to set a data_field for the widget before call get_value, get_new_value or getAsstring.
  */
 public function __construct($name, $add_default_data_field = true)
 {
     parent::__construct($name, 'fld');
     $this->setProperty('name', $this->getId());
     $this->build('p4a_collection', 'buttons');
     if ($add_default_data_field) {
         $this->build('P4A_Data_Field', 'data_field');
     }
     $this->build('P4A_Label', 'label');
     $this->label->setProperty('for', $this->getId() . 'input');
     $this->setDefaultLabel();
 }
Beispiel #6
0
 /**
  * @param string		Mnemonic identifier for the object.
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setDefaultLabel();
     $this->addAction('onclick');
     $this->build("P4A_Collection", "items");
 }
Beispiel #7
0
 /**
  * Sets the label and its visibility
  * When a label is visible it will be rendered next to the icon (if there's an icon),
  * otherwise you'll see the lable as a tooltip.
  *
  * @param string $label
  * @param boolean $visible
  * @return P4A_Button
  */
 public function setLabel($label, $visible = false)
 {
     $this->_label_visible = $visible;
     return parent::setLabel($label);
 }
Beispiel #8
0
 /**
  * @param string $name Object identifier
  * @param string $value
  */
 public function __construct($name, $value = null)
 {
     parent::__construct($name);
     $this->setLabel($value);
 }
Beispiel #9
0
 /**
  * @param string $name Mnemonic identifier for the object
  * @param string $id Object ID, if not specified will be generated
  */
 public function __construct($name, $id = null)
 {
     parent::__construct($name, 'lnk', $id);
     $this->addAction("onclick");
 }
Beispiel #10
0
 /**
  * Class constructor.
  * By default we add an onClick action.
  * @param string $name Mnemonic identifier for the object
  */
 public function __construct($name = 'rows')
 {
     parent::__construct($name);
     $this->addAction('onclick');
 }
Beispiel #11
0
 /**
  * @param string $name Mnemonic identifier for the object
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->build("p4a_collection", "buttons");
 }