You are here

public function AbstractAutomatedCrop::setImage in Automated Crop 8

Set the image resource from plugin configuration to be cropped.

Parameters

mixed $image: The image resource to be cropped. As default this resource will be an, drupal Image object, but in some others usecase we can set another kind, of image resources. You must be sure to give a correct image object.

Return value

self The plugin object with image property defined.

Overrides AutomatedCropInterface::setImage

1 call to AbstractAutomatedCrop::setImage()
AbstractAutomatedCrop::initCropBox in src/AbstractAutomatedCrop.php
Initializes the properties of the plugins according to the configurations.

File

src/AbstractAutomatedCrop.php, line 198

Class

AbstractAutomatedCrop
Provides a base class for each AutomatedCrop provider plugins.

Namespace

Drupal\automated_crop

Code

public function setImage($image) {
  $this->image = $image;
  return $this;
}