You are here

class UserPreference in Avatar Kit 8

User preference plugin.

This is a special plugin.

Plugin annotation


@AvatarGenerator(
  id = "user_preference",
  label = @Translation("User preference"),
  description = @Translation("Avatar generator calculated based on user preference."),
  dynamic = TRUE,
  fallback = FALSE,
  remote = TRUE
)

Hierarchy

Expanded class hierarchy of UserPreference

File

src/Plugin/AvatarGenerator/UserPreference.php, line 21

Namespace

Drupal\avatars\Plugin\AvatarGenerator
View source
class UserPreference extends AvatarGeneratorBase {

  /**
   * {@inheritdoc}
   */
  public function generateUri(AccountInterface $account) {

    // This is a special plugin. This method should never be called.
    throw new \Exception(__FUNCTION__ . ' called for user_preference plugin.');
  }

}

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.
UserPreference::generateUri public function Creates a URI to an avatar. Overrides AvatarGeneratorBase::generateUri