You are here

public function Crop::setSize in Crop API 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Crop.php \Drupal\crop\Entity\Crop::setSize()

Sets crop's size.

Parameters

int $width: Crop's width.

int $height: Crop's height.

Return value

\Drupal\crop\CropInterface Crop object this is being called on.

Overrides CropInterface::setSize

File

src/Entity/Crop.php, line 102

Class

Crop
Defines the crop entity class.

Namespace

Drupal\crop\Entity

Code

public function setSize($width, $height) {
  $this->width = $width;
  $this->height = $height;
  return $this;
}