1
0
Fork 0
mirror of synced 2025-04-16 07:31:03 +00:00

Исправление автозагрузки классов для мультисайта

This commit is contained in:
Mozgito 2022-06-09 14:10:58 +03:00
parent 9cf274ec66
commit be9a8cd7d6

View file

@ -33,6 +33,11 @@ class RetailcrmClasspathBuilder
*/
protected $path = 'classes/general';
/**
* @var string
*/
protected $bitrixModulesPath = 'bitrix/modules';
/**
* Do not include directory paths as namespaces.
* @var bool
@ -272,7 +277,8 @@ class RetailcrmClasspathBuilder
*/
protected function getSearchPath(): string
{
return __DIR__ . DIRECTORY_SEPARATOR . $this->path;
return $this->documentRoot . DIRECTORY_SEPARATOR . $this->bitrixModulesPath . DIRECTORY_SEPARATOR
. $this->moduleId. DIRECTORY_SEPARATOR . $this->path;
}
/**
@ -284,8 +290,7 @@ class RetailcrmClasspathBuilder
{
return (string) str_ireplace(implode(DIRECTORY_SEPARATOR, [
$this->documentRoot,
'bitrix',
'modules',
$this->bitrixModulesPath,
$this->moduleId
]) . DIRECTORY_SEPARATOR, '', $filePath);
}