private function getFieldsDefinitions($fields)
    {
        $fieldDefs = [];

        /** @var $field Field */
        foreach ($fields as $name => $field) {
            $def = $this->deepDeconstruct($field);

            if (null !== $field->relation && null !== $field->relation->toModel) {
                unset($def['constructorArgs']['to']);
            }

            $fieldDefs[] = $def;
        }

        return $fieldDefs;
    }
private function getFieldsDefinitions($fields)
    {
        $fieldDefs = [];

        /** @var $field Field */
        foreach ($fields as $name => $field) {
            $def = $this->deepDeconstruct($field);

            if (null !== $field->relation && null !== $field->relation->toModel) {
                unset($def['constructorArgs']['to']);
            }

            $fieldDefs[] = $def;
        }

        return $fieldDefs;
    }
private function getFieldsDefinitions ( $ fields ) { $ fieldDefs = [ ] ; /** @var $field Field */ foreach ( $ fields as $ name => $ field ) { $ def = $ this -> deepDeconstruct ( $ field ) ; if ( null !== $ field -> relation && null !== $ field -> relation -> toModel ) { unset ( $ def [ 'constructorArgs' ] [ 'to' ] ) ; } $ fieldDefs [ ] = $ def ; } return $ fieldDefs ; }
Return a definition of the fields that ignores field names and what
related fields actually relate to.

Used for detecting renames (as, of course, the related fields change
during renames)

@param $fields

@return array

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
Return a definition of the fields that ignores field names and what related fields actually relate to .