src/Forms/Resources/Transformers/FieldTransformer.php
public function transform(FieldTypeInterface $field)
    {
        return [
            'attributes' => $field->getAttributes(),
            'basename' => $field->getBaseName(),
            'component' => $field->getComponent(),
            'data_type' => $field->getOption('data_type', ''),
            'default' => $field->getOption('data', ''),
            'name' => $field->getName(),
            'options' => $this->getOptions($field),
            'label' => [
                'inner' => $field->getOption('label'),
                'attributes' => $field->getOption('label_attr', [])
            ],
            'theme' => $field->getTheme(),
            'type' => $field->getType(),
            'validation' => [
                'errors' => $field->getOption('errors', true),
                'messages' => $field->errors()->toArray(),
                'placeholder' => $field->getOption('placeholder'),
                'rules' => $field->getOption('rules', '')
            ],
            'value' => 'checkbox' === $field->getType() ? $field->getRawValue() : $field->getValue(''),
        ];
    }
public function transform(FieldTypeInterface $field)
    {
        return [
            'attributes' => $field->getAttributes(),
            'basename' => $field->getBaseName(),
            'component' => $field->getComponent(),
            'data_type' => $field->getOption('data_type', ''),
            'default' => $field->getOption('data', ''),
            'name' => $field->getName(),
            'options' => $this->getOptions($field),
            'label' => [
                'inner' => $field->getOption('label'),
                'attributes' => $field->getOption('label_attr', [])
            ],
            'theme' => $field->getTheme(),
            'type' => $field->getType(),
            'validation' => [
                'errors' => $field->getOption('errors', true),
                'messages' => $field->errors()->toArray(),
                'placeholder' => $field->getOption('placeholder'),
                'rules' => $field->getOption('rules', '')
            ],
            'value' => 'checkbox' === $field->getType() ? $field->getRawValue() : $field->getValue(''),
        ];
    }
public function transform ( FieldTypeInterface $ field ) { return [ 'attributes' => $ field -> getAttributes ( ) , 'basename' => $ field -> getBaseName ( ) , 'component' => $ field -> getComponent ( ) , 'data_type' => $ field -> getOption ( 'data_type' , '' ) , 'default' => $ field -> getOption ( 'data' , '' ) , 'name' => $ field -> getName ( ) , 'options' => $ this -> getOptions ( $ field ) , 'label' => [ 'inner' => $ field -> getOption ( 'label' ) , 'attributes' => $ field -> getOption ( 'label_attr' , [ ] ) ] , 'theme' => $ field -> getTheme ( ) , 'type' => $ field -> getType ( ) , 'validation' => [ 'errors' => $ field -> getOption ( 'errors' , true ) , 'messages' => $ field -> errors ( ) -> toArray ( ) , 'placeholder' => $ field -> getOption ( 'placeholder' ) , 'rules' => $ field -> getOption ( 'rules' , '' ) ] , 'value' => 'checkbox' === $ field -> getType ( ) ? $ field -> getRawValue ( ) : $ field -> getValue ( '' ) , ] ; }
Transform single field.

@param FieldTypeInterface $field

@return array
Transform single field .