You are here

public function AvatarBaseInterface::setDimensions in Avatar Kit 8

Sets dimensions to get form the endpoint.

Parameters

int $width: The width of the avatar.

int|null $height: The height of the avatar, or NULL to mirror value for width.

Return value

\Drupal\avatars\AvatarBaseInterface Returns the called Robohash object for chaining.

Throws

\Drupal\avatars\Exception\AvatarException Thrown if the passed dimensions are invalid.

1 method overrides AvatarBaseInterface::setDimensions()
AvatarBase::setDimensions in src/AvatarBase.php
Sets dimensions to get form the endpoint.

File

src/AvatarBaseInterface.php, line 108

Class

AvatarBaseInterface
Interface for Avatar APIs.

Namespace

Drupal\avatars

Code

public function setDimensions($width, $height = NULL);