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

Keyword Field Type

=20
=20
=20
=20

This Field Type represents keywords.

Name Internal name Expected input
Keyword ezkeyword string[]|string

Description

This Field Type stores one or several comma-separated keywords as a stri= ng or array of strings.

PHP API Field Type 

Input expectations

Type Example
string
"documentation"=
string

"php, eZ Publish, html5"

string[]= array( "eZ Systems", "Enterp= rise", "User Experience Management" )

Value object

Properties

The Value class of this Field Type contains the following properties:

Property Type Description
$value string[] Holds an array of keywords as stri= ngs.
Value object content example
=20
use eZ\Publish\Core\FieldType\Keyword\Value;
 
// Instantiates a Value object
$keywordValue =3D new Value();
 
// Sets an array of keywords as a value
$keyword->value =3D array( "php", "css3", "html5", "eZ Publish" );
= =20
Constructor

The Keyword\Val= ue constructor will initialize a new Value = object with the value provided.

It expects a list of keywords, either comma-separated in a string = or as an array of strings.

Constructor example
=20
use eZ\Publish\Core\FieldType\Keyword\Value;
 
// Instantiates a Value object with an array of keywords
$keywordValue =3D new Value( array( "php5", "css3", "html5" ) );
 
// Instantiates a Value object with a list of keywords in a string
// This is equivalent to the example above
$keywordValue =3D new Value( "php5,css3,html5" );
=20
=20
=20
=20
=20

 

=20
=20
=20
------=_Part_4125_1206040641.1485857811040--