/** * Returns the form list drop down * * @param integer $selectedId selected option in the form * * @return string HTML drop down menu */ function getFormDorpdown($selectedId = null) { global $_ARRAYLANG; parent::getSettings(); $arrOptions = array(); foreach ($this->formList as $key => $objForm) { $arrOptions[$objForm->id] = $objForm->title; } $options .= parent::buildDropdownmenu($arrOptions, $selectedId); return $options; }
/** * Return's the category dropdown * * @global array $_ARRAYLANG * @param integer $selectedId * @param integer $type * @return string Return's the html dropdown of the categories. */ function getCategoryDropdown($selectedId = null, $type) { global $_ARRAYLANG; parent::getSettings(); $arrOptions = array(); foreach ($this->categoryList as $key => $objCategory) { if ($this->arrSettings['countCategoryEntries'] == 1) { $count = ' (' . $objCategory->countEntries(false, true) . ')'; } else { $count = ''; } $arrOptions[$objCategory->id] = $objCategory->name . $count; } switch (intval($type)) { case 1: $options = "<option value=''>" . $_ARRAYLANG['TXT_CALENDAR_ALL_CAT'] . "</option>"; break; case 2: $options = "<option value=''>" . $_ARRAYLANG['TXT_CALENDAR_PLEASE_CHOOSE'] . "</option>"; break; default: $options = "<option value=''></option>"; break; } $options .= parent::buildDropdownmenu($arrOptions, $selectedId); return $options; }