private function BuildTplOptionList($extParamSetTemplateListTableName, $extBruType) { $bruType = $extBruType; $paramSetTemplateListTableName = $extParamSetTemplateListTableName; $PSTempl = new PSTempl(); $PSTList = $PSTempl->GetPSTList($paramSetTemplateListTableName, $this->_user->username); $defaultPSTName = $PSTempl->GetDefaultPST($paramSetTemplateListTableName, $this->_user->username); unset($PSTempl); $optionsStr = ""; $Bru = new Bru(); for ($i = 0; $i < count($PSTList); $i++) { $PSTRow = $PSTList[$i]; $paramsArr = $PSTRow[1]; $params = implode(", ", $paramsArr); $paramNamesStr = $Bru->GetParamNames($bruType, $paramsArr); if ($PSTRow[0] == $defaultPSTName) { $optionsStr .= "<option id='tplOption' " . "name='" . $PSTRow[0] . "' " . "title='" . $params . "' " . "data-comment='" . $paramNamesStr . "' " . "data-params='" . $params . "' " . "data-defaulttpl='true' " . "selected> " . "(" . $this->lang->defaultTpl . ") " . $PSTRow[0] . " - " . $params . "</option>"; } else { if ($PSTRow[0] != EVENTS_TPL_NAME && $PSTRow[0] != PARAMS_TPL_NAME) { $optionsStr .= "<option id='tplOption' " . "name='" . $PSTRow[0] . "' " . "title='" . $params . "' " . "data-comment='" . $paramNamesStr . "' " . "data-params='" . $params . "' " . "data-defaulttpl='true' " . "selected> " . $PSTRow[0] . " - " . $params . "</option>"; } } } unset($Bru); return $optionsStr; }