src/Graviton/GeneratorBundle/Generator/ResourceGenerator/FieldMapper.php
public function buildFields(JsonDefinition $jsonDefinition)
    {
        $fields = [];
        foreach ($jsonDefinition->getFields() as $field) {
            if ($field->getName() != 'id') {
                $fields[] = [
                    'fieldName' => $field->getName(),
                    'type' => $field->getTypeDoctrine()
                ];
            }
        }

        return $fields;
    }
public function buildFields(JsonDefinition $jsonDefinition)
    {
        $fields = [];
        foreach ($jsonDefinition->getFields() as $field) {
            if ($field->getName() != 'id') {
                $fields[] = [
                    'fieldName' => $field->getName(),
                    'type' => $field->getTypeDoctrine()
                ];
            }
        }

        return $fields;
    }
public function buildFields ( JsonDefinition $ jsonDefinition ) { $ fields = [ ] ; foreach ( $ jsonDefinition -> getFields ( ) as $ field ) { if ( $ field -> getName ( ) != 'id' ) { $ fields [ ] = [ 'fieldName' => $ field -> getName ( ) , 'type' => $ field -> getTypeDoctrine ( ) ] ; } } return $ fields ; }
builds the initial fields array with a json definition

@param JsonDefinition $jsonDefinition definition

@return array fields
builds the initial fields array with a json definition