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

Integer Field Type

=20
=20
=20
=20

This Field Type represents an integer value.

Name Internal name Expected input
Integer ezinteger integer

Description

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

PHP API Field Type 

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&n= bsp;initialize a new Value object with the value provided. It expects a num= eric, 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 Field Type is simply integer value as a string.

Example:

"8"

String representation

String representation of the Field Type's value will return the integer = value as a string.

Example:

"8"

Validation

This Field Type 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 /= V1.5.2, V1.6.= 1 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 Field Type does not support settings.

 

=20
=20
=20
=20

 

=20
=20
=20
------=_Part_4121_1807661489.1485857801831--