src/Forms/FormField.php
public function getAttributes()
    {
        $attributes = array(
            'type' => $this->getInputType(),
            'name' => $this->getName(),
            'value' => $this->Value(),
            'class' => $this->extraClass(),
            'id' => $this->ID(),
            'disabled' => $this->isDisabled(),
            'readonly' => $this->isReadonly(),
            'autofocus' => $this->isAutofocus()
        );

        if ($this->Required()) {
            $attributes['required'] = 'required';
            $attributes['aria-required'] = 'true';
        }

        $attributes = array_merge($attributes, $this->attributes);

        $this->extend('updateAttributes', $attributes);

        return $attributes;
    }
public function getAttributes()
    {
        $attributes = array(
            'type' => $this->getInputType(),
            'name' => $this->getName(),
            'value' => $this->Value(),
            'class' => $this->extraClass(),
            'id' => $this->ID(),
            'disabled' => $this->isDisabled(),
            'readonly' => $this->isReadonly(),
            'autofocus' => $this->isAutofocus()
        );

        if ($this->Required()) {
            $attributes['required'] = 'required';
            $attributes['aria-required'] = 'true';
        }

        $attributes = array_merge($attributes, $this->attributes);

        $this->extend('updateAttributes', $attributes);

        return $attributes;
    }
public function getAttributes ( ) { $ attributes = array ( 'type' => $ this -> getInputType ( ) , 'name' => $ this -> getName ( ) , 'value' => $ this -> Value ( ) , 'class' => $ this -> extraClass ( ) , 'id' => $ this -> ID ( ) , 'disabled' => $ this -> isDisabled ( ) , 'readonly' => $ this -> isReadonly ( ) , 'autofocus' => $ this -> isAutofocus ( ) ) ; if ( $ this -> Required ( ) ) { $ attributes [ 'required' ] = 'required' ; $ attributes [ 'aria-required' ] = 'true' ; } $ attributes = array_merge ( $ attributes , $ this -> attributes ) ; $ this -> extend ( 'updateAttributes' , $ attributes ) ; return $ attributes ; }
Allows customization through an 'updateAttributes' hook on the base class.
Existing attributes are passed in as the first argument and can be manipulated,
but any attributes added through a subclass implementation won't be included.

@return array
Allows customization through an updateAttributes hook on the base class . Existing attributes are passed in as the first argument and can be manipulated but any attributes added through a subclass implementation won t be included .