setasign\SetaPDF2\FormFiller\Field
RadioButtonGroup A radio button group
File: /SetaPDF v2/FormFiller/Field/RadioButtonGroup.php
Old class name (alias):
\SetaPDF_FormFiller_Field_ButtonGroup
Class hierarchy
Implements
Summary
Methods
- __construct()
- addButton()
- cleanUp()
- delete()
- flatten()
- getButtons()
- getDefaultButton()
- getDefaultValue()
- getFields()
- getName()
- getNoExport()
- getOriginalQualifiedName()
- getPageNumber()
- getQualifiedName()
- getTooltip()
- getValue()
- isReadOnly()
- isRequired()
- isSetValueActive()
- onFieldDeleted()
- setDefaultValue()
- setNoExport()
- setReadOnly()
- setRequired()
- setTooltip()
- setValue()
Properties
$_fields
A reference to the fields instance
$_qualifiedName
The qualified name of the button group
Methods
__construct()
string $qualifiedName,
\SetaPDF_Core_Type_IndirectObject $fieldObject
The constructor.
Parameters
- $fields : \SetaPDF_FormFiller_Fields
- $qualifiedName : string
- $fieldObject : \SetaPDF_Core_Type_IndirectObject
Exceptions
addButton()
delete()
Delete the button group.
Exceptions
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws Exception
flatten()
Flatten the button group to the pages content stream.
Parameters
- $recreateAppearanceIfNeedAppearancesIsSet : bool
Defines whether the field appearance is re-created if the NeedAppearances flag is set.
Exceptions
Throws \setasign\SetaPDF2\Core\Document\ObjectNotFoundException
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException
Throws \setasign\SetaPDF2\Core\Reader\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
Throws \setasign\SetaPDF2\Exception
getButtons()
Get all buttons of the button group.
Please note: Radio buttons and checkbox buttons are defined almost identically in the PDF format. Because of that this method returns checkbox button instances.
getDefaultValue()
Returns the default value of the button group.
This value is used if the form is reset
Parameters
- $encoding : string
See
getNoExport()
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()
Get the page number(s) on which the button group appears.
Exceptions
Throws \setasign\SetaPDF2\Core\Document\ObjectNotDefinedException
Throws \setasign\SetaPDF2\Core\Document\ObjectNotFoundException
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws Exception
getValue()
Get the export value of the current active button.
This method returns the export value of the first checked button.
Exceptions
onFieldDeleted()
Is called when a button in this group is deleted.
Parameters
- $button : \SetaPDF_FormFiller_Field_Button
setDefaultValue()
Set the default value of this button group.
Parameters
- $value : string|null|\SetaPDF_FormFiller_Field_Button
- $encoding : string
Exceptions
Throws \DOMException
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Exception
setNoExport()
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 : bool
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 \DOMException
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\Font\Exception
Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
Throws \setasign\SetaPDF2\Exception
Throws \setasign\SetaPDF2\NotImplementedException
Throws \setasign\SetaPDF2\FormFiller\Exception
Throws Exception