You are here

class StaticTestGenerator in Avatar Kit 8

Static test avatar generator.

Plugin annotation


@AvatarGenerator(
  id = "avatars_test_static",
  label = @Translation("Static Test Generator"),
  description = @Translation("Static test avatar generator."),
  fallback = TRUE,
  dynamic = FALSE,
  remote = TRUE
)

Hierarchy

Expanded class hierarchy of StaticTestGenerator

File

tests/modules/avatars_test/src/Plugin/AvatarGenerator/StaticTestGenerator.php, line 21

Namespace

Drupal\avatars_test\Plugin\AvatarGenerator
View source
class StaticTestGenerator extends AvatarGeneratorBase {

  /**
   * {@inheritdoc}
   */
  public function generateUri(AccountInterface $account) {
    return Url::fromRoute('avatars_test.image', [], [
      'absolute' => TRUE,
    ])
      ->toString();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AvatarGeneratorBase::buildConfigurationForm public function Form constructor. Overrides PluginFormInterface::buildConfigurationForm 3
AvatarGeneratorBase::calculateDependencies public function Calculates dependencies for the configured plugin. Overrides DependentPluginInterface::calculateDependencies
AvatarGeneratorBase::defaultConfiguration public function Gets default configuration for this plugin. Overrides ConfigurableInterface::defaultConfiguration 3
AvatarGeneratorBase::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration
AvatarGeneratorBase::getFile public function Gets File object for an avatar. Overrides AvatarGeneratorPluginInterface::getFile 1
AvatarGeneratorBase::getIdentifier protected function Create a site-unique identifier for a user.
AvatarGeneratorBase::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration
AvatarGeneratorBase::settingsSummary public function Generate a summary about the current configuration of the widget. Overrides AvatarGeneratorPluginInterface::settingsSummary 3
AvatarGeneratorBase::submitConfigurationForm public function Form submission handler. Overrides PluginFormInterface::submitConfigurationForm 3
AvatarGeneratorBase::validateConfigurationForm public function Form validation handler. Overrides PluginFormInterface::validateConfigurationForm
AvatarGeneratorBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase::__construct
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
StaticTestGenerator::generateUri public function Creates a URI to an avatar. Overrides AvatarGeneratorBase::generateUri