SetaPDF_FormFiller_Field_ButtonGroup A radio button group

File: /SetaPDF v2/FormFiller/Field/ButtonGroup.php

Class hierarchy

Implements

Summary

Properties

$_buttons

protected SetaPDF_FormFiller_Field_Button[] SetaPDF_FormFiller_Field_ButtonGroup::$_buttons = array()

The buttons

$_fieldDictionary

protected SetaPDF_Core_Type_Dictionary SetaPDF_FormFiller_Field_ButtonGroup::$_fieldDictionary

The main field dictionary

$_fields

protected SetaPDF_FormFiller_Fields SetaPDF_FormFiller_Field_ButtonGroup::$_fields

A reference to the fields instance

$_qualifiedName

protected string SetaPDF_FormFiller_Field_ButtonGroup::$_qualifiedName

The qualified name of the button group

$_setValueActive

protected boolean SetaPDF_FormFiller_Field_ButtonGroup::$_setValueActive = false

A flag indicating that a setValue call is active


Methods

__construct()

addButton()

Add a button to the group.

Parameters
$button : SetaPDF_FormFiller_Field_Button
 

cleanUp()

Release cycled references and release memory.

See

delete()

Delete the button group.

flatten()

Flatten the button group to the pages content stream.

getButtons()

Get all buttons of the button group.

getDefaultButton()

getDefaultValue()

public SetaPDF_FormFiller_Field_ButtonGroup::getDefaultValue (
[ string $encoding = 'UTF-8' ]
): null|string

Returns the default value of the button group.

This value is used if the form is reset

Parameters
$encoding : string
 
See

getFields()

getName()

getNoExport()

public SetaPDF_FormFiller_Field_ButtonGroup::getNoExport (
void
): boolean|null

Get the info, if the button group is marked as "no export".

This flag is not get- or settable with Acrobat!

getOriginalQualifiedName()

Returns the original qualified name.

(which is the same as the qualified name for button groups)

getPageNumber()

public SetaPDF_FormFiller_Field_ButtonGroup::getPageNumber (
void
): integer|array

Get the page number(s) on which the button group appears.

getQualifiedName()

Returns the qualified name.

getTooltip()

public SetaPDF_FormFiller_Field_ButtonGroup::getTooltip (
[ string $encoding = 'UTF-8' ]
): bool|string|null

Get the tooltip value.

Parameters
$encoding : string
 

getValue()

public SetaPDF_FormFiller_Field_ButtonGroup::getValue (
void
): string|mixed

Get the export value of the current active button.

This method returns the export value of the first checked button.

isReadOnly()

public SetaPDF_FormFiller_Field_ButtonGroup::isReadOnly (
void
): boolean|null

Checks if the button group is marked as read-only.

isRequired()

public SetaPDF_FormFiller_Field_ButtonGroup::isRequired (
void
): boolean|null

Checks if the button group is marked as required.

isSetValueActive()

Checks if a setValue operation is active.

onFieldDeleted()

Is called when a button in this group is deleted.

Parameters
$button : SetaPDF_FormFiller_Field_Button
 

setDefaultValue()

public SetaPDF_FormFiller_Field_ButtonGroup::setDefaultValue (
string|null $value [, string $encoding = 'UTF-8' ]
): void

Set the default value of this button group.

Parameters
$value : string|null
 
$encoding : string
 

setNoExport()

public SetaPDF_FormFiller_Field_ButtonGroup::setNoExport (
[ boolean $noExport = true ]
): void

Sets the "no export" flag.

This flag is not get- or settable with Acrobat!

If you remove this flag, the element could be still not exported due to a definition in a FormSubmit actions Fields array.

Parameters
$noExport : boolean
 

setReadOnly()

public SetaPDF_FormFiller_Field_ButtonGroup::setReadOnly (
[ boolean $readOnly = true ]
): void

Sets the button group to read-only or not.

Parameters
$readOnly : boolean
 

setRequired()

public SetaPDF_FormFiller_Field_ButtonGroup::setRequired (
[ boolean $required = true ]
): void

Sets the button group to be required or not.

Parameters
$required : boolean
 

setTooltip()

public SetaPDF_FormFiller_Field_ButtonGroup::setTooltip (
string|false $value [, string $encoding = 'UTF-8' ]
): void

Set the tooltip value.

Parameters
$value : string|false
 
$encoding : string
 

setValue()

Set the value / active button of the button group.

This method requires the button object, which should be activated as the parameter or an export value which will be used to find the desired button.

Parameters
$value : SetaPDF_FormFiller_Field_Button|string

The button instance or an export value

Exceptions

Throws InvalidArgumentException