config = $this->getModule('host_config')->getConfig(); $hosts = array_keys($this->config); $this->RepeaterHosts->DataSource = $hosts; $this->RepeaterHosts->dataBind(); } public function createHostListElement($sender, $param) { $control = $this->getChildControl($param->Item, self::CHILD_CONTROL); if (is_object($control)) { $control->setHost($param->Item->DataItem); } $param->Item->RemoveHost->setCommandParameter($param->Item->DataItem); } public function getComponents($sender, $param) { $control = $this->getChildControl($sender->getParent(), self::CHILD_CONTROL); if (is_object($control)) { $control->raiseEvent('OnComponentListLoad', $this, null); } } public function bubbleEvent($sender, $param) { if ($param instanceof TCommandEventParameter) { $this->loadConfig(null, null); return true; } else { return false; } } public function removeHost($sender, $param) { if(!$_SESSION['admin']) { return; } $host = $param->getCommandParameter(); if (!empty($host)) { $host_config = $this->getModule('host_config'); $config = $host_config->getConfig(); unset($config[$host]); $host_config->setConfig($config); $this->loadConfig(null, null); if ($host === HostConfig::MAIN_CATALOG_HOST) { $url = $this->Service->constructUrl('WebConfigWizard', array(), false); $this->getResponse()->redirect($url); } } } } ?>