PhoneNumber
PhoneNumber
PhoneNumber
- Full name: \Gibbon\Forms\Input\PhoneNumber
- Parent class: \Gibbon\Forms\Input\Input
Methods
- __construct — Create a number input that holds an internal Column object of phoneType, phoneCodes, and phoneNumber inputs.
- setCountryCodeOptions — Set an array of possible country codes.
- setValue — Set the phone number.
- getValue — Gets the current phone number value.
- loadFrom — Pass an array of $key => $value pairs into the internal Column object.
- getValidationOutput — Get the validation output from the internal Column object.
Inherited from Element
Inherited from Input
- setRow
- addValidationOption
- addValidation
- isValidatable
- hasValidation
- getValidationAsJSON
- getValidationOutput
Inherited from InputAttributesTrait
- setName
- getName
- setValue
- getValue
- loadFrom
- loadFromCSV
- setSize
- getSize
- isDisabled
- setDisabled
- getDisabled
- isRequired
- setRequired
- getRequired
- readonly
- setReadonly
- getReadonly
- setTabIndex
- getTabIndex
Inherited from Element
Inherited from BasicAttributesTrait
- setID
- getID
- setTitle
- getTitle
- setClass
- addClass
- removeClass
- getClass
- addData
- getData
- getAttributeString
__construct
Create a number input that holds an internal Column object of phoneType, phoneCodes, and phoneNumber inputs.
PhoneNumber::__construct( \Gibbon\Forms\FormFactoryInterface &$factory, string $name, array $countryCodes = array() )
setCountryCodeOptions
Set an array of possible country codes.
PhoneNumber::setCountryCodeOptions( array $countryCodes ): self
Returns Self: This method can be chained.
setValue
Set the phone number.
PhoneNumber::setValue( array $value = '' ): self
Returns Self: This method can be chained.
getValue
Gets the current phone number value.
PhoneNumber::getValue( ): string
Return Value:
string
loadFrom
Pass an array of $key => $value pairs into the internal Column object.
PhoneNumber::loadFrom( &$data ): object
Return Value:
object
Column
getValidationOutput
Get the validation output from the internal Column object.
PhoneNumber::getValidationOutput( ): string
Return Value:
string