1
0
mirror of synced 2024-11-23 22:06:11 +03:00
bitrix-module/intaro.retailcrm/lib/repository/siterepository.php
Сергей Чазов a4c06ed8ee
New ICML generator
2021-05-31 16:33:02 +03:00

30 lines
583 B
PHP

<?php
namespace Intaro\RetailCrm\Repository;
use CSite;
use RetailcrmConfigProvider;
/**
* Class SiteRepository
* @package Intaro\RetailCrm\Repository
*/
class SiteRepository
{
/**
* @return string
*/
public static function getDefaultServerName(): ?string
{
$rsSites = CSite::GetList($by, $sort, ['ACTIVE' => 'Y']);
while ($ar = $rsSites->Fetch()) {
if ($ar['DEF'] === 'Y') {
return RetailcrmConfigProvider::getProtocol() . $ar['SERVER_NAME'];
}
}
return null;
}
}