You are here

AvatarGenerator.php in Avatar Kit 8

File

src/Annotation/AvatarGenerator.php
View source
<?php

namespace Drupal\avatars\Annotation;

use Drupal\Component\Annotation\Plugin;

/**
 * Defines an annotation for AvatarGenerator plugins.
 *
 * @Annotation
 */
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;

}

Classes

Namesort descending Description
AvatarGenerator Defines an annotation for AvatarGenerator plugins.