class Adorable in Avatar Kit 8
Same name in this branch
- 8 avatars_adorable/src/Adorable.php \Drupal\avatars_adorable\Adorable
- 8 avatars_adorable/src/Plugin/AvatarGenerator/Adorable.php \Drupal\avatars_adorable\Plugin\AvatarGenerator\Adorable
Adorable.io avatar generator.
Plugin annotation
@AvatarGenerator(
id = "adorable",
label = @Translation("Adorable"),
description = @Translation("Adorable avatars by adorable.io"),
fallback = TRUE,
dynamic = FALSE,
remote = TRUE
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\avatars\Plugin\AvatarGenerator\AvatarGeneratorBase implements AvatarGeneratorPluginInterface
- class \Drupal\avatars_adorable\Plugin\AvatarGenerator\Adorable
- class \Drupal\avatars\Plugin\AvatarGenerator\AvatarGeneratorBase implements AvatarGeneratorPluginInterface
Expanded class hierarchy of Adorable
1 string reference to 'Adorable'
- avatars_adorable.info.yml in avatars_adorable/
avatars_adorable.info.yml - avatars_adorable/avatars_adorable.info.yml
File
- avatars_adorable/
src/ Plugin/ AvatarGenerator/ Adorable.php, line 21
Namespace
Drupal\avatars_adorable\Plugin\AvatarGeneratorView source
class Adorable extends AvatarGeneratorBase {
/**
* {@inheritdoc}
*/
public function generateUri(AccountInterface $account) {
$api = new AdorableAPI();
return $api
->setIdentifier($this
->getIdentifier($account))
->setDimensions(256)
->getUrl();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Adorable:: |
public | function |
Creates a URI to an avatar. Overrides AvatarGeneratorBase:: |
|
AvatarGeneratorBase:: |
public | function |
Form constructor. Overrides PluginFormInterface:: |
3 |
AvatarGeneratorBase:: |
public | function |
Calculates dependencies for the configured plugin. Overrides DependentPluginInterface:: |
|
AvatarGeneratorBase:: |
public | function |
Gets default configuration for this plugin. Overrides ConfigurableInterface:: |
3 |
AvatarGeneratorBase:: |
public | function |
Gets this plugin's configuration. Overrides ConfigurableInterface:: |
|
AvatarGeneratorBase:: |
public | function |
Gets File object for an avatar. Overrides AvatarGeneratorPluginInterface:: |
1 |
AvatarGeneratorBase:: |
protected | function | Create a site-unique identifier for a user. | |
AvatarGeneratorBase:: |
public | function |
Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: |
|
AvatarGeneratorBase:: |
public | function |
Generate a summary about the current configuration of the widget. Overrides AvatarGeneratorPluginInterface:: |
3 |
AvatarGeneratorBase:: |
public | function |
Form submission handler. Overrides PluginFormInterface:: |
3 |
AvatarGeneratorBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |
|
AvatarGeneratorBase:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. |