interface AvatarKitEntityFieldHandlerInterface in Avatar Kit 8.2
Handles pushing avatar caches into entities.
Hierarchy
- interface \Drupal\avatars\AvatarKitEntityFieldHandlerInterface
Expanded class hierarchy of AvatarKitEntityFieldHandlerInterface
All classes that implement AvatarKitEntityFieldHandlerInterface
1 file declares its use of AvatarKitEntityFieldHandlerInterface
- AvatarKitEntityFieldPreferenceSubscriber.php in src/
EventSubscriber/ AvatarKitEntityFieldPreferenceSubscriber.php
File
- src/
AvatarKitEntityFieldHandlerInterface.php, line 13
Namespace
Drupal\avatarsView source
interface AvatarKitEntityFieldHandlerInterface {
/**
* Copies the avatar in a cache entity to an entity.
*
* @param \Drupal\Core\Entity\FieldableEntityInterface $entity
* A entity.
* @param \Drupal\avatars\Entity\AvatarCacheInterface $avatar_cache
* An avatar cache entity.
*/
public function copyCacheToEntity(FieldableEntityInterface $entity, AvatarCacheInterface $avatar_cache) : void;
/**
* Checks if there are updates to the first avatar for an entity.
*
* If an entity doesn't have an entity yet, it may get one. If it is not time
* to check for updates, then we will not check.
*
* @param \Drupal\Core\Entity\FieldableEntityInterface $entity
* Check this avatar if it needs a new avatar.
*/
public function checkUpdates(FieldableEntityInterface $entity) : void;
/**
* Get field name for avatars.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* Get the field name for this entity.
*
* @return string|null
* The field name, or NULL if no field name is defined.
*/
public function getAvatarFieldName(EntityInterface $entity) : ?string;
/**
* Get target field configuration for an entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* Get the field for this entity.
*
* @return \Drupal\field\FieldConfigInterface|null
* A field config entity, or NULL if one does not exist for this entity.
*/
public function getAvatarFieldConfig(EntityInterface $entity) : ?FieldConfigInterface;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AvatarKitEntityFieldHandlerInterface:: |
public | function | Checks if there are updates to the first avatar for an entity. | 1 |
AvatarKitEntityFieldHandlerInterface:: |
public | function | Copies the avatar in a cache entity to an entity. | 1 |
AvatarKitEntityFieldHandlerInterface:: |
public | function | Get target field configuration for an entity. | 1 |
AvatarKitEntityFieldHandlerInterface:: |
public | function | Get field name for avatars. | 1 |