class CropArea extends SubjectArea (View source)

Properties

int $width from  SubjectArea
int $height from  SubjectArea
int $x from  SubjectArea
int $y from  SubjectArea

Methods

__construct(int $x, int $y, int $width = 1, int $height = 1)

SubjectArea constructor.

createFromJsonResponse(string|array $data, bool $isArray = false)

Create a CropArea from the JSON data.

static string
getName()

No description

mixed
getForJson()

Get the data, which should be json-fied later.

Details

__construct(int $x, int $y, int $width = 1, int $height = 1)

SubjectArea constructor.

The SubjectArea can also be defined as a point, by setting both "width" and "height" to 1.

Parameters

int $x

X-point of the subject area, 0-based

int $y

Y-point of the subject area, 0-based

int $width

The width of the subject area box, default to 1px

int $height

The height of the subject area box, default to 1px

Exceptions

InvalidArgumentException

static DynamicMetadataInterface createFromJsonResponse(string|array $data, bool $isArray = false)

Create a CropArea from the JSON data.

Parameters

string|array $data

JSON data

bool $isArray

If the data provided is already an array

Return Value

DynamicMetadataInterface

static string getName()

No description

Return Value

string

The name of the metadata

mixed getForJson()

Get the data, which should be json-fied later.

Return Value

mixed