original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Fills form field data if no field data is set.
docstring_tokens: Fills form field data if no field data is set .