Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

Commit

Permalink
Fix bug with custom services loading
Browse files Browse the repository at this point in the history
  • Loading branch information
rratsun committed Aug 31, 2020
1 parent d5d82ac commit e822bb3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/Treo/Core/ServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,13 @@ protected function getClassName(string $name): string
/** @var string $module */
$module = $this->container->get('metadata')->get(['scopes', $name, 'module'], 'Espo');

// prepare module name for Treo services
if ($module == 'TreoCore') {
$module = 'Treo';
switch ($module) {
case 'TreoCore':
$module = 'Treo';
break;
case 'Custom':
$module = 'Espo\\Custom';
break;
}

$this->classNames[$name] = "\\$module\\Services\\$name";
Expand Down

0 comments on commit e822bb3

Please sign in to comment.