Exemple #1
0
 /**
  * Class constructor
  *
  * @param mixed $parent      Parent record (Q\DB_Record), parent table (Q\DB_Record) or Database connection (Q\DB)
  * @param array $properties  Field properties (can be passed as reference)
  * @param mixed $value
  */
 protected function __construct($parent, $properties, $value = null)
 {
     parent::__construct($parent, $properties);
     if ($this->mode == self::MODE_ACTIVE) {
         $this->setValue($value);
     }
 }
Exemple #2
0
Fichier : Info.php Projet : jasny/Q
 /**
  * Class constructor
  *
  * @param string $generateAction  The action on which the value should be generated: 'insert', 'update' or 'both'
  * @param mixed  $properties      Array with field properties
  */
 function __construct($generateAction, $properties = array())
 {
     if (isset($generateAction)) {
         $this->_generateAction = $generateAction;
     }
     if (!isset($properties['no_edit'])) {
         $properties['no_edit'] = true;
     }
     parent::__construct($properties);
 }