Message-ID: <87630620.3080.1485851889366.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3079_1456805860.1485851889365" ------=_Part_3079_1456805860.1485851889365 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html The Integer FieldType

The Integer FieldType

This field type represents an integer value.

Name Internal name Expected input
Integer ezinteger integer

Table of contents:

=20 =20

Description


This FieldType stores numeric values which will be provided as integers.=

Input expectations


Type Example
integer

2397

Value object


Properties

The Value class of this field type contains the following properties:

Property Type Description
$value int This property will be used to stor= e the value provided as an integer.
Value object content example
=20
$integer->value =3D 8
=20

Constructor

The Integer \Value constructor will&= nbsp;initialize a new Value object with the value provided. It expects a nu= meric, integer value.

Constructor example
=20
use eZ\Publish\Core\FieldType\Integer;
 
// Instantiates a Integer Value object
$integerValue =3D new Integer\Value( 8 );
=20

Hash format

Hash value of this FieldType is simply integer value as a string.

Example:

"8"

String representation

String representation of the FieldType's value will return the integer v= alue as a string.

Example:

"8"

Validation


This FieldType supports  IntegerValueValidator , defining maximal and minimal float value:

Name Type Default value Description
minIntegerValue int 0
This setting defines the minimum value this Fiel= dType will allow as input.
maxIntegerValue int

false / SINCE 5.4.9 null

This setting defines the maximum v= alue this FieldType will allow as input.
Example of validator configuration in PHP
=20
$validatorConfiguration =3D array(
=09"minIntegerValue" =3D> 1,
=09"maxIntegerValue" =3D> 24
);
=20

Settings


This FieldType does not support settings.

 

------=_Part_3079_1456805860.1485851889365--