You are here

public function Crop::size in Crop API 8

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

Gets crop's size.

Return value

array Array with two keys (width, height) each side dimensions as values.

Overrides CropInterface::size

File

src/Entity/Crop.php, line 92

Class

Crop
Defines the crop entity class.

Namespace

Drupal\crop\Entity

Code

public function size() {
  return [
    'width' => (int) $this->width->value,
    'height' => (int) $this->height->value,
  ];
}