public function __construct($name, $values, $server_id, $source = null)
 {
     # Call our parent constructor
     parent::__construct($name, $values, $server_id, $source);
     # Our values are set by parent(). If we do have values, and the source was XML, move them to our selection.
     if ($this->source == 'XML' && $this->values) {
         $this->selection = $this->values;
         $this->values = array();
     }
     if (isset($values['type']) && $values['type'] == 'multiselect') {
         $this->multiple = true;
     } else {
         $this->multiple = false;
     }
 }
 public function __construct($value = null, $AttributeType = null)
 {
     parent::__construct();
     $this->value = $value;
     $this->AttributeType = $AttributeType;
 }
 public function __construct($value = NULL, $AttributeType = NULL)
 {
     if (get_parent_class('AdSpecListAttribute')) {
         parent::__construct();
     }
     $this->value = $value;
     $this->AttributeType = $AttributeType;
 }
 public function __construct($name, $values, $server_id, $source = null)
 {
     parent::__construct($name, $values, $server_id, $source);
     $this->filepaths = array();
     $this->filenames = array();
 }
Beispiel #5
0
 function __construct($attrId, $optionId)
 {
     $attrId = Attribute::toID($attrId);
     $optionId = ProductOption::toID($optionId);
     parent::__construct($attrId);
     static $q = null;
     createStaticQuery($q, "\r\n\t\t\tSELECT attribute_value\r\n\t\t\tFROM cf_product_options_attributes\r\n\t\t\tWHERE product_option_id=:optionId AND attribute_id=:attrId\r\n\t\t");
     $q->setParam('optionId', $optionId);
     $q->setParam('attrId', $attrId);
     $q->execute();
     if ($q->fetch()) {
         $this->setValue($q->at('attribute_value'));
     }
     $q->close();
 }
 /**
  * TextAttribute constructor.
  *
  * @param string $name
  * @param string $type
  * @param array  $flags
  */
 public function __construct($name = '', $type = 'text', $flags = [])
 {
     $this->flags = $flags;
     parent::__construct($name, $flags);
 }