protected function fillDataForEmpty()
    {
        // Fill field references if they are empty
        $fields = [];

        // Add columns for attributes
        foreach ($this->info->attributes as $attribute) {

            if ($attribute->hidden || ! $this->shouldAttributeBeEditableByDefault($attribute, $this->info)) {
                continue;
            }

            $fields[ $attribute->name ] = $this->makeModelFormFieldDataForAttributeData($attribute);
        }


        // Add fields for relations
        foreach ($this->info->relations as $relation) {

            $fields[ $relation->name ] = $this->makeModelFormFieldDataForRelationData($relation);
        }


        $this->info->form->fields = $fields;
    }
protected function fillDataForEmpty()
    {
        // Fill field references if they are empty
        $fields = [];

        // Add columns for attributes
        foreach ($this->info->attributes as $attribute) {

            if ($attribute->hidden || ! $this->shouldAttributeBeEditableByDefault($attribute, $this->info)) {
                continue;
            }

            $fields[ $attribute->name ] = $this->makeModelFormFieldDataForAttributeData($attribute);
        }


        // Add fields for relations
        foreach ($this->info->relations as $relation) {

            $fields[ $relation->name ] = $this->makeModelFormFieldDataForRelationData($relation);
        }


        $this->info->form->fields = $fields;
    }
protected function fillDataForEmpty ( ) { // Fill field references if they are empty $ fields = [ ] ; // Add columns for attributes foreach ( $ this -> info -> attributes as $ attribute ) { if ( $ attribute -> hidden || ! $ this -> shouldAttributeBeEditableByDefault ( $ attribute , $ this -> info ) ) { continue ; } $ fields [ $ attribute -> name ] = $ this -> makeModelFormFieldDataForAttributeData ( $ attribute ) ; } // Add fields for relations foreach ( $ this -> info -> relations as $ relation ) { $ fields [ $ relation -> name ] = $ this -> makeModelFormFieldDataForRelationData ( $ relation ) ; } $ this -> info -> form -> fields = $ fields ; }
Fills form field data if no field data is set.
Fills form field data if no field data is set .