public function __construct($spec, $options = NULL)
 {
     if ($spec instanceof BuggyPress_Filter) {
         $this->_filter = $spec;
         $spec = self::FIELD_NAME;
     }
     parent::__construct($spec, $options);
 }
Esempio n. 2
0
 public function __construct($attributId, $spec = '', $options = '')
 {
     parent::__construct($spec, $options);
     $table = new ValueList();
     $select = $table->select();
     $select->order(ValueList::COL_NAME);
     $select->where(ValueList::COL_ATTRIBUTE_DESCRIPTOR_ID . "= ?", $attributId);
     $rowset = $table->fetchAll($select);
     $array = $rowset->toArray();
     $optArray = array(null => 'Please select');
     foreach ($array as $value) {
         $optArray = $optArray + array($value[ValueList::COL_ID] => $value[ValueList::COL_NAME]);
     }
     $this->setMultiOptions($optArray);
 }