Button
extends AbstractField
in package
Pdf page button field class
Tags
Table of Contents
Properties
- $defaultValue : string|null
- Field default value
- $flagBits : array<string|int, mixed>
- Field flag bits
- $font : string|null
- Text field font
- $fontColor : ColorInterface|null
- Field font color
- $height : int|null
- Text field height
- $name : string|null
- Field name
- $options : array<string|int, mixed>
- Field options
- $size : int
- Text field font size
- $value : string|null
- Field value
- $width : int|null
- Text field width
Methods
- __construct() : mixed
- Constructor
- addOption() : Button
- Add an option
- getDefaultValue() : string|null
- Get the field default value
- getFont() : string|null
- Get the font
- getFontColor() : ColorInterface|null
- Get the field font color
- getHeight() : int|null
- Get the field height
- getName() : string|null
- Get the field name
- getSize() : int
- Get the font size
- getStream() : string
- Get the field stream
- getValue() : string|null
- Get the field value
- getWidth() : int|null
- Get the field width
- hasOptions() : bool
- Has options
- isPushButton() : bool
- Is push button
- isRadio() : bool
- Is radio
- setDefaultValue() : AbstractField
- Set the field default value
- setFont() : AbstractField
- Set the font
- setFontColor() : AbstractField
- Set the font color
- setHeight() : AbstractField
- Set the field height
- setName() : AbstractField
- Set the field name
- setNoExport() : AbstractField
- Set no export
- setNoToggleToOff() : Button
- Set no toggle to off
- setPushButton() : Button
- Set push button
- setRadio() : Button
- Set radio
- setRadiosInUnison() : Button
- Set radios in unison
- setReadOnly() : AbstractField
- Set read-only
- setRequired() : AbstractField
- Set required
- setSize() : AbstractField
- Set the font size
- setValue() : AbstractField
- Set the field value
- setWidth() : AbstractField
- Set the field width
- getFlags() : int
- Get the flags value
Properties
$defaultValue
Field default value
protected
string|null
$defaultValue
= null
$flagBits
Field flag bits
protected
array<string|int, mixed>
$flagBits
= []
$font
Text field font
protected
string|null
$font
= null
$fontColor
Field font color
protected
ColorInterface|null
$fontColor
= null
$height
Text field height
protected
int|null
$height
= null
$name
Field name
protected
string|null
$name
= null
$options
Field options
protected
array<string|int, mixed>
$options
= []
$size
Text field font size
protected
int
$size
= 12
$value
Field value
protected
string|null
$value
= null
$width
Text field width
protected
int|null
$width
= null
Methods
__construct()
Constructor
public
__construct(string $name[, string|null $font = null ][, int $size = 12 ]) : mixed
Instantiate a PDF text field object.
Parameters
- $name : string
- $font : string|null = null
- $size : int = 12
addOption()
Add an option
public
addOption(string $option[, int $xOffset = 0 ][, int $yOffset = 0 ]) : Button
Parameters
- $option : string
- $xOffset : int = 0
- $yOffset : int = 0
Return values
ButtongetDefaultValue()
Get the field default value
public
getDefaultValue() : string|null
Return values
string|nullgetFont()
Get the font
public
getFont() : string|null
Return values
string|nullgetFontColor()
Get the field font color
public
getFontColor() : ColorInterface|null
Return values
ColorInterface|nullgetHeight()
Get the field height
public
getHeight() : int|null
Return values
int|nullgetName()
Get the field name
public
getName() : string|null
Return values
string|nullgetSize()
Get the font size
public
getSize() : int
Return values
intgetStream()
Get the field stream
public
getStream(int $i, int $pageIndex, string|null $fontReference, int $x, int $y) : string
Parameters
- $i : int
- $pageIndex : int
- $fontReference : string|null
- $x : int
- $y : int
Return values
stringgetValue()
Get the field value
public
getValue() : string|null
Return values
string|nullgetWidth()
Get the field width
public
getWidth() : int|null
Return values
int|nullhasOptions()
Has options
public
hasOptions() : bool
Return values
boolisPushButton()
Is push button
public
isPushButton() : bool
Return values
boolisRadio()
Is radio
public
isRadio() : bool
Return values
boolsetDefaultValue()
Set the field default value
public
setDefaultValue(string $value) : AbstractField
Parameters
- $value : string
Return values
AbstractFieldsetFont()
Set the font
public
setFont(string $font) : AbstractField
Parameters
- $font : string
Return values
AbstractFieldsetFontColor()
Set the font color
public
setFontColor(ColorInterface $color) : AbstractField
Parameters
- $color : ColorInterface
Return values
AbstractFieldsetHeight()
Set the field height
public
setHeight(int $height) : AbstractField
Parameters
- $height : int
Return values
AbstractFieldsetName()
Set the field name
public
setName(string $name) : AbstractField
Parameters
- $name : string
Return values
AbstractFieldsetNoExport()
Set no export
public
setNoExport() : AbstractField
Return values
AbstractFieldsetNoToggleToOff()
Set no toggle to off
public
setNoToggleToOff() : Button
Return values
ButtonsetPushButton()
Set push button
public
setPushButton() : Button
Return values
ButtonsetRadio()
Set radio
public
setRadio() : Button
Return values
ButtonsetRadiosInUnison()
Set radios in unison
public
setRadiosInUnison() : Button
Return values
ButtonsetReadOnly()
Set read-only
public
setReadOnly() : AbstractField
Return values
AbstractFieldsetRequired()
Set required
public
setRequired() : AbstractField
Return values
AbstractFieldsetSize()
Set the font size
public
setSize(int $size) : AbstractField
Parameters
- $size : int
Return values
AbstractFieldsetValue()
Set the field value
public
setValue(string $value) : AbstractField
Parameters
- $value : string
Return values
AbstractFieldsetWidth()
Set the field width
public
setWidth(int $width) : AbstractField
Parameters
- $width : int
Return values
AbstractFieldgetFlags()
Get the flags value
protected
getFlags() : int