original_string: public function edit($id)
      {
          $record = $this->modelRepository->findOrFail($id);
  
          $fields = array_only(
              $this->modelInformation->form->fields,
              $this->getRelevantFormFieldKeys()
          );
  
          $this->checkListParents(false);
  
          $values = $this->getFormFieldValuesFromModel($record, array_keys($fields));
          $errors = $this->getNormalizedFormFieldErrors();
  
          $renderedFields = $this->renderedFormFieldStrategies($record, $fields, $values, $errors);
  
          return view($this->getEditView(), [
              'moduleKey'           => $this->moduleKey,
              'routePrefix'         => $this->routePrefix,
              'permissionPrefix'    => $this->permissionPrefix,
              'model'               => $this->modelInformation,
              'record'              => $record,
              'recordReference'     => $this->getReferenceRepository()->getReferenceForModel($record),
              'creating'            => false,
              'fields'              => $fields,
              'fieldStrategies'     => $renderedFields,
              'values'              => $values,
              'fieldErrors'         => $errors,
              'activeTab'           => $this->getActiveTab(),
              'errorsPerTab'        => $this->getErrorCountsPerTabPane(),
              'hasActiveListParent' => (bool) $this->listParentRelation,
              'topListParentOnly'   => $this->showsTopParentsOnly(),
              'listParents'         => $this->listParents,
          ]);
      }
code: public function edit($id)
      {
          $record = $this->modelRepository->findOrFail($id);
  
          $fields = array_only(
              $this->modelInformation->form->fields,
              $this->getRelevantFormFieldKeys()
          );
  
          $this->checkListParents(false);
  
          $values = $this->getFormFieldValuesFromModel($record, array_keys($fields));
          $errors = $this->getNormalizedFormFieldErrors();
  
          $renderedFields = $this->renderedFormFieldStrategies($record, $fields, $values, $errors);
  
          return view($this->getEditView(), [
              'moduleKey'           => $this->moduleKey,
              'routePrefix'         => $this->routePrefix,
              'permissionPrefix'    => $this->permissionPrefix,
              'model'               => $this->modelInformation,
              'record'              => $record,
              'recordReference'     => $this->getReferenceRepository()->getReferenceForModel($record),
              'creating'            => false,
              'fields'              => $fields,
              'fieldStrategies'     => $renderedFields,
              'values'              => $values,
              'fieldErrors'         => $errors,
              'activeTab'           => $this->getActiveTab(),
              'errorsPerTab'        => $this->getErrorCountsPerTabPane(),
              'hasActiveListParent' => (bool) $this->listParentRelation,
              'topListParentOnly'   => $this->showsTopParentsOnly(),
              'listParents'         => $this->listParents,
          ]);
      }
code_tokens: public function edit ( $ id ) { $ record = $ this -> modelRepository -> findOrFail ( $ id ) ; $ fields = array_only ( $ this -> modelInformation -> form -> fields , $ this -> getRelevantFormFieldKeys ( ) ) ; $ this -> checkListParents ( false ) ; $ values = $ this -> getFormFieldValuesFromModel ( $ record , array_keys ( $ fields ) ) ; $ errors = $ this -> getNormalizedFormFieldErrors ( ) ; $ renderedFields = $ this -> renderedFormFieldStrategies ( $ record , $ fields , $ values , $ errors ) ; return view ( $ this -> getEditView ( ) , [ 'moduleKey' => $ this -> moduleKey , 'routePrefix' => $ this -> routePrefix , 'permissionPrefix' => $ this -> permissionPrefix , 'model' => $ this -> modelInformation , 'record' => $ record , 'recordReference' => $ this -> getReferenceRepository ( ) -> getReferenceForModel ( $ record ) , 'creating' => false , 'fields' => $ fields , 'fieldStrategies' => $ renderedFields , 'values' => $ values , 'fieldErrors' => $ errors , 'activeTab' => $ this -> getActiveTab ( ) , 'errorsPerTab' => $ this -> getErrorCountsPerTabPane ( ) , 'hasActiveListParent' => ( bool ) $ this -> listParentRelation , 'topListParentOnly' => $ this -> showsTopParentsOnly ( ) , 'listParents' => $ this -> listParents , ] ) ; }
docstring: Displays form to edit an existing record.
  
  @param mixed $id
  @return mixed
docstring_tokens: Displays form to edit an existing record .