ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Integer

Summary

Validates and stores an integer value.

Properties

NameInternal nameSearchableInformation collector
Integer ezinteger Yes. No.

Description

This datatype makes it possible to validate, store and retrieve a single integer value. It is capable of handling both positive and negative numbers ranging from -2,147,483,648 to 2,147,483,647. The following screenshot shows the class edit interface for this datatype.

Class edit interface for the "Integer" datatype.

Class edit interface for the "Integer" datatype.

Default value

The "Default value" parameter makes it possible to set a default integer. When the parameter is used and a new object is created, the contents of the attribute using this datatype will be preset to the given value. In the example above, the "Correct result" attribute of new objects will be set to 13.

Min integer value

The "Min integer value" parameter makes it possible to set the lowest value that the input interface will allow. The default value of this parameter is empty, which means that the system will allow the lowest possible value, which is -2,147,483,648. In the example above, the parameter is set to "-64". This means that the input interface will not allow the storage of numbers with values less than -64.

Max integer value

The "Max integer value" parameter makes it possible to set the highest value that the input interface will allow. The default value of this parameter is empty, which means that the system will allow the highest possible value, which is 2,147,483,647. In the example above, the parameter is set to "48". This means that the input interface will not allow the storage of numbers with values as high as 48.

Object attribute edit interface

The following screenshot shows the object attribute interface for this datatype.

Object attribute edit interface for the "Integer" datatype.

Object attribute edit interface for the "Integer" datatype.

Raw output

The ".content" of an ezcontentobjectattribute object using this datatype returns a string containing the actual integer.

Balazs Halasy (21/02/2005 2:39 pm)

Balazs Halasy (29/04/2005 11:17 am)


Comments

  • Negative interger value

    Good day,

    Im trying to sustract two interger variables $int1 and $int2, both of then are positive and they are object attributes that I bring to the template system throght a fetch content function. As in the fetch the .content of each interger attribute brings the variables as strings I use a |int templeta function to turn then into interger values and then use:

    sum($int1,-$int2)

    It seem it does not work, i think is the variables type. How can I work out this problem?. Or how can I set and interger variable negative?