Field
in package
implements
FieldInterface
Content type field
Table of Contents
Interfaces
- FieldInterface
- Field interface
Properties
- $name : string
- Field name
- $title : string|null
- Field title(label)
- $type : string
- Field type
- $value : mixed
- Field value
Methods
- __construct() : mixed
- Constructor
- create() : FieldInterface
- Create field
- getName() : string
- Get field name
- getTitle() : string|null
- Get field title
- getType() : string
- Get field type
- getValue() : mixed
- Get field value
- isValidType() : bool
- Return true if field type is valid
- setValue() : void
- Set field value
Properties
$name
Field name
protected
string
$name
$title
Field title(label)
protected
string|null
$title
= null
$type
Field type
protected
string
$type
$value
Field value
protected
mixed
$value
= null
Methods
__construct()
Constructor
public
__construct(string $name, string $type[, string|null $title = null ][, mixed $value = null ]) : mixed
Parameters
- $name : string
- $type : string
- $title : string|null = null
- $value : mixed = null
create()
Create field
public
static create(string $name, string $type[, string|null $title = null ][, mixed $value = null ]) : FieldInterface
Parameters
- $name : string
- $type : string
- $title : string|null = null
- $value : mixed = null
Return values
FieldInterfacegetName()
Get field name
public
getName() : string
Return values
stringgetTitle()
Get field title
public
getTitle() : string|null
Return values
string|nullgetType()
Get field type
public
getType() : string
Return values
stringgetValue()
Get field value
public
getValue() : mixed
isValidType()
Return true if field type is valid
public
static isValidType(string $type) : bool
Parameters
- $type : string
Return values
boolsetValue()
Set field value
public
setValue(mixed $value) : void
Parameters
- $value : mixed