You are here

protected function AvatarKitCommonService::createService in Avatar Kit 8.2

Creates a service from Avatar Kit library.

Parameters

\dpi\ak\AvatarConfigurationInterface $configuration: Avatar service configuration.

Return value

\dpi\ak\AvatarKit\AvatarServices\AvatarServiceInterface A new service instance

1 call to AvatarKitCommonService::createService()
AvatarKitCommonService::getService in src/Plugin/Avatars/Service/AvatarKitCommonService.php
Create a service instance.

File

src/Plugin/Avatars/Service/AvatarKitCommonService.php, line 74

Class

AvatarKitCommonService
Automatically creates services based on plugins from Avatar Kit library.

Namespace

Drupal\avatars\Plugin\Avatars\Service

Code

protected function createService(AvatarConfigurationInterface $configuration) : AvatarServiceInterface {
  $id = $this
    ->getDerivativeId();
  return $this->avatarKitServiceFactory
    ->createService($id, $configuration);
}