You are here

public static function AvatarKitCommonService::create in Avatar Kit 8.2

Same name in this branch
  1. 8.2 src/Plugin/Derivative/AvatarKitCommonService.php \Drupal\avatars\Plugin\Derivative\AvatarKitCommonService::create()
  2. 8.2 src/Plugin/Avatars/Service/AvatarKitCommonService.php \Drupal\avatars\Plugin\Avatars\Service\AvatarKitCommonService::create()

Creates a new class instance.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the fetcher.

string $base_plugin_id: The base plugin ID for the plugin ID.

Return value

static Returns an instance of this fetcher.

Overrides ContainerDeriverInterface::create

File

src/Plugin/Derivative/AvatarKitCommonService.php, line 45

Class

AvatarKitCommonService
Creates services for each Avatar Kit library service.

Namespace

Drupal\avatars\Plugin\Derivative

Code

public static function create(ContainerInterface $container, $base_plugin_id) {
  return new static($base_plugin_id, $container
    ->get('avatars.avatar_kit.discovery.services'));
}