You are here

protected function AvatarBase::setDimensionConstraints in Avatar Kit 8

Sets constraints for avatar dimensions.

Parameters

int $width_minimum: The minimum width.

int $width_maximum: The maximum width.

int|null $height_minimum: The minimum height, or NULL to mirror minimum width.

int|null $height_maximum: The maximum height, or NULL to mirror maximum width.

3 calls to AvatarBase::setDimensionConstraints()
Adorable::__construct in avatars_adorable/src/Adorable.php
Constructs a new Adorable object.
Gravatar::__construct in avatars_gravatar/src/Gravatar.php
Constructs a new Gravatar object.
Robohash::__construct in avatars_robohash/src/Robohash.php
Constructs a new Robohash object.

File

src/AvatarBase.php, line 197

Class

AvatarBase
Abstract class for Avatar APIs.

Namespace

Drupal\avatars

Code

protected function setDimensionConstraints($width_minimum, $width_maximum, $height_minimum = NULL, $height_maximum = NULL) {
  $this->dimension_width_maximum = $width_maximum;
  $this->dimension_width_minimum = $width_minimum;
  $this->dimension_height_minimum = $height_minimum;
  $this->dimension_height_maximum = $height_maximum;
}