You are here

class AvatarGenerator in Avatar Kit 8

Same name in this branch
  1. 8 src/Annotation/AvatarGenerator.php \Drupal\avatars\Annotation\AvatarGenerator
  2. 8 src/Entity/AvatarGenerator.php \Drupal\avatars\Entity\AvatarGenerator

Defines an annotation for AvatarGenerator plugins.

Hierarchy

Expanded class hierarchy of AvatarGenerator

9 classes are annotated with AvatarGenerator
Adorable in avatars_adorable/src/Plugin/AvatarGenerator/Adorable.php
Adorable.io avatar generator.
Broken in src/Plugin/AvatarGenerator/Broken.php
Fallback plugin for missing AvatarGenerator plugins.
DynamicTestGenerator in tests/modules/avatars_test/src/Plugin/AvatarGenerator/DynamicTestGenerator.php
Dynamic test avatar generator.
Gravatar in avatars_gravatar/src/Plugin/AvatarGenerator/Gravatar.php
Gravatar avatar generator.
GravatarGenerator in avatars_gravatar/src/Plugin/AvatarGenerator/GravatarGenerator.php
Gravatar generated avatars generator.

... See full list

File

src/Annotation/AvatarGenerator.php, line 12

Namespace

Drupal\avatars\Annotation
View source
class AvatarGenerator extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the plugin.
   *
   * @var \Drupal\Core\Annotation\Translation
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * The weight of the plugin.
   *
   * @var int
   */
  public $weight;

  /**
   * The description of the avatar generator.
   *
   * @var \Drupal\Core\Annotation\Translation
   * @ingroup plugin_translatable
   */
  public $description;

  /**
   * Whether the avatar generated by generator can change.
   *
   * @var bool
   */
  public $dynamic = FALSE;

  /**
   * Whether the generator will always produce an avatar.
   *
   * @var bool
   */
  public $fallback = FALSE;

  /**
   * Defines the source of the avatar.
   *
   * Whether the generator produces a URI for downloading the avatar (uses
   * generateUri method). Otherwise the file is already local (use getFile
   * method).
   *
   * @var bool
   */
  public $remote = FALSE;

}

Members

Namesort descending Modifiers Type Description Overrides
AvatarGenerator::$description public property The description of the avatar generator.
AvatarGenerator::$dynamic public property Whether the avatar generated by generator can change.
AvatarGenerator::$fallback public property Whether the generator will always produce an avatar.
AvatarGenerator::$id public property The plugin ID.
AvatarGenerator::$label public property The human-readable name of the plugin.
AvatarGenerator::$remote public property Defines the source of the avatar.
AvatarGenerator::$weight public property The weight of the plugin.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2