You are here

public function PhotosImage::setWeight in Album Photos 8.5

Same name and namespace in other branches
  1. 6.0.x src/Entity/PhotosImage.php \Drupal\photos\Entity\PhotosImage::setWeight()

Sets the image weight for custom sorting.

Parameters

int $weight: The image weight.

Return value

$this The called image entity.

Overrides PhotosImageInterface::setWeight

File

src/Entity/PhotosImage.php, line 278

Class

PhotosImage
Defines the photos image entity class.

Namespace

Drupal\photos\Entity

Code

public function setWeight($weight) {
  $this
    ->set('weight', $weight);
  return $this;
}