InputAttributesTrait

InputAttributesTrait

Basic HTML Input Attributes (name, type, value, required)

Methods

setName

Set the input’s name attribute.

InputAttributesTrait::setName( string $name = '' ): self

Returns Self: This method can be chained.


getName

Gets the input’s name attribute.

InputAttributesTrait::getName( ): string

Return Value: string


setValue

Set the input’s value.

InputAttributesTrait::setValue( string $value = '' ): self

Returns Self: This method can be chained.


getValue

Gets the input’s value.

InputAttributesTrait::getValue( ): mixed

Return Value: mixed


loadFrom

Sets the input’s value if the name matches a key in the provided data set.

InputAttributesTrait::loadFrom( &$data )

loadFromCSV

Sets the input’s array value from a CSV string if the name matches a key in the provided data set.

InputAttributesTrait::loadFromCSV( &$data )

setSize

Set the input’s size attribute.

InputAttributesTrait::setSize( string|integer $size = '' ): self

Returns Self: This method can be chained.


getSize

Gets the input’s size attribute.

InputAttributesTrait::getSize( ): string|integer

Return Value: string|integer


isDisabled

Set the input to disabled.

InputAttributesTrait::isDisabled( $disabled = true ): self

Returns Self: This method can be chained.


setDisabled

Set the input’s disabled attribute.

InputAttributesTrait::setDisabled( boolean $disabled ): self

Returns Self: This method can be chained.


getDisabled

Gets the input’s disabled attribute.

InputAttributesTrait::getDisabled( ): boolean

Return Value: boolean


isRequired

Set the input to required.

InputAttributesTrait::isRequired( $required = true ): self

Returns Self: This method can be chained.


setRequired

Set if the input is required.

InputAttributesTrait::setRequired( boolean $required ): self

Returns Self: This method can be chained.


getRequired

Gets the input’s required attribute.

InputAttributesTrait::getRequired( ): boolean

Return Value: boolean


readonly

Set the input to readonly.

InputAttributesTrait::readonly( boolean $value = true ): self

Returns Self: This method can be chained.


setReadonly

Set the input’s readonly attribute.

InputAttributesTrait::setReadonly( string $value ): self

Returns Self: This method can be chained.


getReadonly

Gets the input’s readonly attribute.

InputAttributesTrait::getReadonly( ): boolean

Return Value: boolean


setTabIndex

Set the input’s tabindex attribute.

InputAttributesTrait::setTabIndex( string $value ): self

Returns Self: This method can be chained.


getTabIndex

Gets the input’s tabindex attribute.

InputAttributesTrait::getTabIndex( ): integer

Return Value: integer


Last updated : September 15, 2018 b92362d