AttributeAutofocusTrait
This is the 'autofocus' attribute trait.
This trait has been created to share common code between form elements classes, in this case the declaration of the 'autofocus' attribute and its set/get methods.
Tags
Table of Contents
$autofocus | : bool | |
---|---|---|
getAutofocus() | This method returns the current value of the 'autofocus' attribute. | : bool |
setAutofocus() | This method sets the 'autofocus' attribute with the given value and returns self. | : self |
Properties
$autofocus
protected
bool
$autofocus
= false
Methods
getAutofocus()
This method returns the current value of the 'autofocus' attribute.
public
getAutofocus() : bool
Return values
bool —setAutofocus()
This method sets the 'autofocus' attribute with the given value and returns self.
public
setAutofocus(bool $autofocus) : self
Parameters
- $autofocus : bool