You are here

public function AvatarKitService::getPlugin in Avatar Kit 8.2

Returns the plugin instance.

Return value

\Drupal\avatars\Plugin\Avatars\Service\AvatarKitServiceInterface A Avatar Kit service instance.

Overrides AvatarKitServiceInterface::getPlugin

File

src/Entity/AvatarKitService.php, line 120

Class

AvatarKitService
Defines storage for an avatar service instance.

Namespace

Drupal\avatars\Entity

Code

public function getPlugin() : ?AvatarKitServicePluginInterface {
  if ($this
    ->getPluginCollection()) {
    return $this
      ->getPluginCollection()
      ->get($this
      ->getPluginId());
  }
  return NULL;
}