You are here

public function Crop::setPosition in Crop API 8

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

Sets position of crop's center.

Parameters

int $x: X coordinate of the crop's center.

int $y: Y coordinate of the crop's center.

Return value

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

Overrides CropInterface::setPosition

File

src/Entity/Crop.php, line 72

Class

Crop
Defines the crop entity class.

Namespace

Drupal\crop\Entity

Code

public function setPosition($x, $y) {
  $this->x = $x;
  $this->y = $y;
  return $this;
}