You are here

protected function AvatarKitService::getPluginCollection in Avatar Kit 8.2

Encapsulates a lazy plugin collection.

Return value

\Drupal\Component\Plugin\LazyPluginCollection|null The plugin collection.

2 calls to AvatarKitService::getPluginCollection()
AvatarKitService::getPlugin in src/Entity/AvatarKitService.php
Returns the plugin instance.
AvatarKitService::getPluginCollections in src/Entity/AvatarKitService.php
Gets the plugin collections used by this object.

File

src/Entity/AvatarKitService.php, line 150

Class

AvatarKitService
Defines storage for an avatar service instance.

Namespace

Drupal\avatars\Entity

Code

protected function getPluginCollection() : ?LazyPluginCollection {
  if (!$this->pluginCollection && $this->plugin) {
    $args = [
      $this
        ->getAvatarServiceServicePluginManager(),
      $this->plugin,
      $this->settings,
    ];
    $this->pluginCollection = new DefaultSingleLazyPluginCollection(...$args);
  }
  return $this->pluginCollection;
}