31 return ($this->
getOption(
'is_demo') ===
true);
72 abstract public function register(array $fields);
101 if (defined(
'ADMIN_SECTION') && ADMIN_SECTION ===
true)
103 return 'messageservice_sender_sms.php?sender_id='.$this->getId();
106 return '/crm/configs/sms/?sender='.$this->getId();
152 $id = $this->
getId();
153 return $this->getHostUrl().
'/bitrix/tools/messageservice/callback_'.$id.
'.php';
162 private function getHostUrl()
164 $protocol = (\CMain::isHTTPS() ?
'https' :
'http');
165 if (defined(
"SITE_SERVER_NAME") && SITE_SERVER_NAME)
167 $host = SITE_SERVER_NAME;
178 if($port <> 80 && $port <> 443 && $port > 0 && mb_strpos($host,
':') ===
false)
182 elseif($protocol ==
'http' && $port == 80)
184 $host = str_replace(
':80',
'', $host);
186 elseif($protocol ==
'https' && $port == 443)
188 $host = str_replace(
':443',
'', $host);
191 return $protocol .
'://' . $host;
202 $providerId = $this->
getId();
203 $providerType = mb_strtolower($this->
getType());
204 Option::set(
'messageservice',
'sender.'.$providerType.
'.'.$providerId, serialize(
$options));
215 return $this->optionManager->getOptions();
227 $this->optionManager->setOption($optionName, $optionValue);
237 protected function getOption($optionName, $defaultValue =
null)
241 return $this->optionManager->getOption($optionName, $defaultValue);
250 $this->optionManager->clearOptions();
257 return static::getId();
293 return $templateData;
Providers TemplateManager $templateManager
Providers OptionManager $optionManager
confirmRegistration(array $fields)
setOptions(array $options)
setOption($optionName, $optionValue)
Providers DemoManager $demoManager
Providers Registrar $registrar
getTemplatesList(array $context=null)
getConfigComponentTemplatePageName()
getMessageStatus(array $messageFields)
prepareTemplate($templateData)
getOption($optionName, $defaultValue=null)