91 $list = $appendDependencies ? Extension::getDependencyList($name) : [];
92 if (!in_array($name, $list))
97 $this->extensions = array_unique(array_merge($this->extensions, $list));
99 $list = array_diff($list, $this->modules);
100 $list = array_filter(
107 $this->modules = array_merge($this->modules, $list);
198 if (!is_array($extensionOptions))
205 if (is_array($properties))
207 foreach ($properties as $propertyName => $propertyValue)
209 $profile->setProperty($propertyName, $propertyValue);
212 $profile->useAllLangs(!!self::getValueByKey($webPacker, Resource\Profile::USE_ALL_LANGS));
213 $profile->useLangCamelCase(!!self::getValueByKey($webPacker, Resource\Profile::USE_LANG_CAMEL_CASE));
214 $deleteLangPrefixes =
self::getValueByKey($webPacker, Resource\Profile::DELETE_LANG_PREFIXES);
215 if (is_array($deleteLangPrefixes))
217 $profile->deleteLangPrefixes($deleteLangPrefixes);
223 $profile->setCallMethod($callMethod);
295 $url = Config\Configuration::getValue(
'main.webpacker')[
'last_site_url'] ??
'';
298 self::$siteUri = $url;
303 $url = $server->getHttpHost();
305 $canSave = !empty($url) && (!defined(
'BX_CRONTAB') || !BX_CRONTAB);
310 $url = Config\Option::get(
'main',
'last_site_url',
null);
317 $url = Config\Option::get(
'main',
'server_name',
null);
318 $url = $url ?: $server->getServerName();
321 $defaultSites = \CSite::getDefList();
322 while($defaultSite = $defaultSites->fetch())
324 $url = $defaultSite[
'SERVER_NAME'];
336 if (strpos($url,
':') ===
false && $server->getServerPort())
338 if (!in_array($server->getServerPort(), array(
'80',
'443')))
340 $url .=
':' . $server->getServerPort();
348 $uri =
new Uri($url);
349 $url = $uri->getLocator();
350 if (mb_substr($url, -1) ==
'/')
352 $url = mb_substr($url, 0, -1);
357 Config\Option::set(
'main',
'last_site_url', $url);
360 self::$siteUri = $url;