/** * Class constructor * * @param string Select name attribute * @param mixed Label(s) for the select (not used) * @param mixed Data to be used to populate options * @param mixed Either a typical HTML attribute string or an associative array (not used) * @since 1.0 * @access public * @return void */ public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $attributes); $this->_persistantFreeze = true; $this->_type = 'hiddenselect'; if (isset($options)) { $this->load($options); } }
/** * constructor * * @param string $elementName Select name attribute * @param mixed $elementLabel Label(s) for the select * @param array $options Data to be used to populate options * @param mixed $attributes Either a typical HTML attribute string or an associative array * @param bool $linkdata data to be posted */ public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null, $linkdata = null) { if (!empty($linkdata['link']) && !empty($linkdata['label'])) { $this->_link = $linkdata['link']; $this->_linklabel = $linkdata['label']; } if (!empty($linkdata['return'])) { $this->_linkreturn = $linkdata['return']; } parent::__construct($elementName, $elementLabel, $options, $attributes); }
/** * Class constructor */ public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $options, $attributes); // Get all languages $themes = api_get_themes(); $this->_options = array(); $this->_values = array(); $this->addOption('--', ''); // no theme select for ($i = 0; $i < count($themes[0]); $i++) { $this->addOption($themes[1][$i], $themes[0][$i]); } }
/** * Class constructor */ public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $options, $attributes); // Get all languages $languages = api_get_languages(); $this->_options = array(); $this->_values = array(); foreach ($languages as $iso => $name) { if ($iso == api_get_setting('language.platform_language')) { $this->addOption($name, $iso, array('selected' => 'selected')); } else { $this->addOption($name, $iso); } } }
/** * Class constructor */ function SelectLanguage($elementName = null, $elementLabel = null, $options = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $options, $attributes); // Get all languages $languages = api_get_languages(); $this->_options = array(); $this->_values = array(); foreach ($languages['name'] as $index => $name) { if ($languages['folder'][$index] == api_get_setting('platformLanguage')) { $this->addOption($name, $languages['folder'][$index], array('selected' => 'selected')); } else { $this->addOption($name, $languages['folder'][$index]); } } }
/** * Class constructor */ function SelectTheme($elementName = null, $elementLabel = null, $options = null, $attributes = null) { if (!isset($attributes['class'])) { //todo this was comment due a bug in infocours.php with jquery-ui //$attributes['class'] = 'chzn-select'; } parent::__construct($elementName, $elementLabel, $options, $attributes); // Get all languages $themes = api_get_themes(); $this->_options = array(); $this->_values = array(); $this->addOption('--', ''); // no theme select for ($i = 0; $i < count($themes[0]); $i++) { $this->addOption($themes[1][$i], $themes[0][$i]); } }
/** * Class constructor */ function SelectAjax($elementName = null, $elementLabel = null, $options = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $options, $attributes); }
/** * Class constructor * * Class constructors : * Zend Engine 1 uses HTML_QuickForm_advmultiselect, while * Zend Engine 2 uses __construct * * @param string $elementName Dual Select name attribute * @param mixed $elementLabel Label(s) for the select boxes * @param mixed $options Data to be used to populate options * @param mixed $attributes Either a typical HTML attribute string or * an associative array * @param integer $sort Either SORT_ASC for auto ascending arrange, * SORT_DESC for auto descending arrange, or * NULL for no sort (append at end: default) * * @access public * @return void * @since version 0.4.0 (2005-06-25) */ public function HTML_QuickForm_advmultiselect($elementName = null, $elementLabel = null, $options = null, $attributes = null, $sort = null) { $opts = $options; $options = null; // prevent to use the default select element load options parent::__construct($elementName, $elementLabel, $options, $attributes); $this->selectAllCheckBox = isset($attributes['select_all_checkbox']) ? $attributes['select_all_checkbox'] : false; // allow to load options at once and take care of fancy attributes $this->load($opts); // add multiple selection attribute by default if missing $this->updateAttributes(array('multiple' => 'multiple')); if (is_null($this->getAttribute('size'))) { // default size is ten item on each select box (left and right) $this->updateAttributes(array('size' => 10)); } if (is_null($this->getAttribute('style'))) { // default width of each select box $this->updateAttributes(array('style' => 'min-width:180px;')); } $this->_tableAttributes = $this->getAttribute('class'); $attr = null; if (is_null($this->_tableAttributes)) { $this->updateAttributes(array('class' => 'col-md-4')); } else { $attr = array('class' => $this->_tableAttributes); $this->_removeAttr('class', $this->_attributes); } $this->_tableAttributes = $this->_getAttrString($attr); // set default add button attributes $this->setButtonAttributes('add'); // set default remove button attributes $this->setButtonAttributes('remove'); // set default selectall button attributes $this->setButtonAttributes('all'); // set default selectnone button attributes $this->setButtonAttributes('none'); // set default toggle selection button attributes $this->setButtonAttributes('toggle'); // set default move up button attributes $this->setButtonAttributes('moveup'); // set default move up button attributes $this->setButtonAttributes('movedown'); // set default move top button attributes $this->setButtonAttributes('movetop'); // set default move bottom button attributes $this->setButtonAttributes('movebottom'); // defines javascript functions names $this->_jsPrefix = 'QFAMS.'; $this->_jsPostfix = 'moveSelection'; // set select boxes sort order (none by default) if (!isset($sort)) { $sort = false; } if ($sort === SORT_ASC) { $this->_sort = 'asc'; } elseif ($sort === SORT_DESC) { $this->_sort = 'desc'; } else { $this->_sort = 'none'; } // set the default advmultiselect element template (with javascript embedded) $this->setElementTemplate(); }