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: improved php examples

...

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

PropertyTypeDefault valueDescription
$boolbooleanfalseThis property will be used for the checkbox status, which will be represented by a boolean value.
Code Block
languagephp
titleValue object content examples
linenumberstrue
use eZ\Publish\Core\FieldType\Checkbox\Type;
 
// Instantiates a checkbox value with a default state (false)
$checkboxValue = new Checkbox\Value();
 
// Checked
$value->bool = true; 
 
// Unchecked
$value->bool = false;

...

Code Block
languagephp
titleConstructor example
linenumberstrue
use eZ\Publish\Core\FieldType\Checkbox\Type;
 
// InstanciatesInstantiates a checkbox value with a checked state
$checkboxValue = new Checkbox\Value( true );

...