Beispiel #1
0
 public function __construct($spec, $options = array())
 {
     $options = array_merge($options, array('disableLoadDefaultDecorators' => true));
     parent::__construct($spec, $options);
     $this->_decorator = new Monkeys_Form_Decorator_Composite();
     $this->addDecorator($this->_decorator);
 }
 public function __construct($spec, $options = NULL)
 {
     if ($spec instanceof BuggyPress_Issue) {
         $this->_issue = $spec;
         $spec = self::FIELD_NAME;
     }
     parent::__construct($spec, $options);
 }
 public function __construct($spec = null, $options = null)
 {
     parent::__construct($spec, $options);
     if ($options == 'everyFifteen') {
         self::_buildTimeforEveryFifteen();
     }
     return $this;
 }
Beispiel #4
0
 public function __construct($spec, $aOptions = array())
 {
     if (isset($aOptions['ajax'])) {
         $this->_ajax = $aOptions['ajax'];
         unset($aOptions['ajax']);
         $this->setRegisterInArrayValidator(false);
     }
     parent::__construct($spec, $aOptions);
 }
 public function __construct($spec = null, $options = null, $values, $required = false)
 {
     parent::__construct($spec, $options);
     $this->addFilter('StringTrim')->setRequired($required)->setLabel($options['label'])->setAttrib('class', $options['class'])->setRegisterInArrayValidator(false)->setDescription(isset($options['desc']) ? $options['desc'] : null)->addMultiOptions($values);
     if (!isset($options['style']) || $options['style'] != 'none') {
         $this->setDecorators(array(new vkNgine_Form_Element_Decorator_Text()));
     }
     if (isset($options['removeDecorators'])) {
         $this->removeDecorator('HtmlTag')->removeDecorator('Label');
     }
 }
Beispiel #6
0
 public function __construct($spec, $options = null)
 {
     $this->addMultiOption("", "");
     $groups = new Snep_GruposRamais();
     $extengroups = array();
     foreach ($groups->getAll() as $group) {
         $extengroups[$group['id_extensiongroup']] = $group['ds_name'];
     }
     $this->addMultiOptions($extengroups);
     parent::__construct($spec, $options);
 }
Beispiel #7
0
 /**
  * Определяем опции мультиселеста и дергаем родительский конструктор
  *
  * @param mixed $spec
  * @param array $options
  */
 public function __construct($spec, $options = null)
 {
     if (isset($options['multiple']) && (bool) $options['multiple'] === true) {
         $this->_isArray = true;
         $this->multiple = 'multiple';
     }
     /**
      * Инициализируем родительский конструктор
      */
     parent::__construct($spec, $options);
 }
Beispiel #8
0
 public function __construct($spec, $options = null)
 {
     $this->addMultiOption("", "");
     $pickupgroup = new Snep_PickupGroups_Manager();
     $pickupgroups = array();
     foreach ($pickupgroup->fetchAll() as $key => $val) {
         $pickupgroups[$val->id_pickupgroup] = $val->ds_name;
     }
     $this->addMultiOptions($pickupgroups);
     parent::__construct($spec, $options);
 }
Beispiel #9
0
 public function __construct($spec, $options = null)
 {
     foreach (PBX_Trunks::getAll() as $trunk) {
         $data[$trunk->getId()] = $trunk->getName();
     }
     if ($data != null) {
         $this->addMultiOptions($data);
     } else {
         $this->addMultiOption(null, '');
     }
     parent::__construct($spec, $options);
 }
Beispiel #10
0
 public function __construct($spec = '', $options = '')
 {
     parent::__construct($spec, $options);
     $table = new KeyTable();
     $select = $table->select();
     $select->order(KeyTable::COL_FILENAME);
     $rowset = $table->fetchAll($select);
     $array = $rowset->toArray();
     $optArray = array(null => 'Please select');
     foreach ($array as $value) {
         $optArray = $optArray + array($value[KeyTable::COL_ID] => $value[KeyTable::COL_FILENAME] . ' (' . $value[KeyTable::COL_NAME] . ')');
     }
     $this->setMultiOptions($optArray);
 }
Beispiel #11
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);
 }
Beispiel #12
0
 function __construct($spec, $options = null)
 {
     parent::__construct($spec, $options);
     if (!isset($options['enum'])) {
         throw new Zend_Form_Exception('Please specify the enum type');
     }
     if (!class_exists($options['enum'])) {
         throw new Zend_Form_Exception('Enum type does not exists');
     }
     $enumName = $options['enum'];
     $oClass = new ReflectionClass($enumName);
     $constants = $oClass->getConstants();
     foreach ($constants as $constName => $constValue) {
         $this->addMultiOption($constValue, "{$enumName}::{$constName}");
     }
 }
Beispiel #13
0
 public function __construct($spec = '', $options = '', $group = '')
 {
     parent::__construct($spec, $options);
     $table = new AttributeDescriptor();
     $select = $table->select();
     $select->order(AttributeDescriptor::COL_NAME);
     if ($group != '') {
         $select->where(AttributeDescriptor::COL_GROUP . "= ?", $group);
     }
     $rowset = $table->fetchAll($select);
     $array = $rowset->toArray();
     $optArray = array(null => 'Please select');
     foreach ($array as $value) {
         $optArray = $optArray + array($value[AttributeDescriptor::COL_ID] => $value[AttributeDescriptor::COL_NAME]);
     }
     $this->setMultiOptions($optArray);
 }
Beispiel #14
0
 public function __construct($spec = '', $options = '')
 {
     parent::__construct($spec, $options);
     //		$table = new Expertise();
     //		$select = $table->select();
     //		$select->order(Expertise::COL_SPECIES);
     //		//$select->where(ValueList::COL_ATTRIBUTE_DESCRIPTOR_ID . "= ?",$attributId);
     //		$rowset = $table->fetchAll($select);
     $dbAdapter = Zend_Registry::get('DB_CONNECTION1');
     $select = $dbAdapter->select();
     $select->from(Expertise::TABLE_NAME);
     $select->joinLeft(array('valSpec' => ValueList::TABLE_NAME), Expertise::COL_SPECIES . ' = ' . 'valSpec.' . ValueList::COL_ID, array('valSpec' => ValueList::COL_VALUE));
     $select->joinLeft(array('valSubj' => ValueList::TABLE_NAME), Expertise::COL_SUBJECT . ' = ' . 'valSubj.' . ValueList::COL_ID, array('valSubj' => ValueList::COL_VALUE));
     $array = $dbAdapter->fetchAll($select);
     //$array = $rowset->toArray();
     $optArray = array(null => 'Please select');
     foreach ($array as $value) {
         $merged = $value[Expertise::COL_ID] . ',' . $value[Expertise::COL_AREA] . ',' . $value['valSpec'] . ',' . $value['valSubj'];
         $optArray = $optArray + array($value[Expertise::COL_ID] => $merged);
     }
     $this->setMultiOptions($optArray);
 }
Beispiel #15
0
 public function __construct($spec, $options = null)
 {
     $options = array_merge($options, $this->_defaultOptions);
     return parent::__construct($spec, $options);
 }
Beispiel #16
0
 public function __construct($spec, $options = null)
 {
     $this->addMultiOptions(array("ulaw" => "ulaw", "alaw" => "alaw", "ilbc" => "ilbc", "g729" => "g729", "gsm" => "gsm", "h264" => "h264", "h263" => "h263", "h263p" => "h263p"));
     parent::__construct($spec, $options);
 }