chore: Inject adapters.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2022-06-26 13:06:03 +02:00
parent f56bfc22f4
commit f48a5df9bb
6 changed files with 21 additions and 18 deletions

View File

@@ -30,7 +30,6 @@ use SP\Core\Acl\ActionsInterface;
use SP\Core\Events\Event;
use SP\Core\Events\EventMessage;
use SP\Domain\Api\Services\ApiResponse;
use SP\Domain\Client\Out\ClientAdapter;
use SP\Util\Util;
/**
@@ -52,10 +51,7 @@ final class ViewController extends ClientBase
$clientData = $this->clientService->getById($id);
$this->eventDispatcher->notifyEvent(
'show.client',
new Event($this)
);
$this->eventDispatcher->notifyEvent('show.client', new Event($this));
$this->eventDispatcher->notifyEvent(
'show.client',
@@ -72,12 +68,7 @@ final class ViewController extends ClientBase
$this->apiService->requireMasterPass();
}
$out = $this->fractal
->createData(
new Item(
$clientData,
new ClientAdapter($this->configData)
));
$out = $this->fractal->createData(new Item($clientData, $this->clientAdapter));
if ($customFields) {
$this->apiService->requireMasterPass();