Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
     Glossary
   eZ Publish 4.x / legacy

 
eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: sync structure

...

TypeExample
float

194079.572

int144

Value object

Properties

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

PropertyTypeDescription
$valuefloatThis property will be used to store the value provided as a float.
Code Block
languagephp
titleValue object content example
linenumberstrue
use eZ\Publish\Core\FieldType\Float\Type;

// Instantiates a Float Value object
$floatValue = new Type\Value();

$float->value = 284.773

Constructor

The Float\Value constructor will initialize a new Value object with the value provided. It expects a numeric value with or without decimals.

Code Block
languagephp
titleConstructor example
linenumberstrue
use eZ\Publish\Core\FieldType\Float\Type;

// Instantiates a Float Value object
$floatValue = new Type\Value( 284.773 );

Validation

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

...

This FieldType does not support settings.

Value object

Properties

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

PropertyTypeDescription
$valuefloatThis property will be used to store the value provided as a float.
Code Block
languagephp
titleValue object content example
linenumberstrue
use eZ\Publish\Core\FieldType\Float\Type;

// Instantiates a Float Value object
$floatValue = new Type\Value();

$float->value = 284.773

Constructor

The Float\Value constructor will initialize a new Value object with the value provided. It expects a numeric value with or without decimals.

Code Block
languagephp
titleConstructor example
linenumberstrue
use eZ\Publish\Core\FieldType\Float\Type;
 
// Instantiates a Float Value object
$floatValue = new Type\Value( 284.773 );