Исправление автозагрузки классов для мультисайта
This commit is contained in:
parent
9cf274ec66
commit
be9a8cd7d6
1 changed files with 8 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue