original_string: protected function getFieldValue($field)
      {
          if (is_string($field)) {
              if (!isset($this->allFields[$field])) {
                  throw new ApplicationException(Lang::get(
                      'backend::lang.form.missing_definition',
                      compact('field')
                  ));
              }
  
              $field = $this->allFields[$field];
          }
  
          $defaultValue = !$this->model->exists
              ? $field->getDefaultFromData($this->data)
              : null;
  
          return $field->getValueFromData(
              $this->data, 
              is_string($defaultValue) ? trans($defaultValue) : $defaultValue
          );
      }
code: protected function getFieldValue($field)
      {
          if (is_string($field)) {
              if (!isset($this->allFields[$field])) {
                  throw new ApplicationException(Lang::get(
                      'backend::lang.form.missing_definition',
                      compact('field')
                  ));
              }
  
              $field = $this->allFields[$field];
          }
  
          $defaultValue = !$this->model->exists
              ? $field->getDefaultFromData($this->data)
              : null;
  
          return $field->getValueFromData(
              $this->data, 
              is_string($defaultValue) ? trans($defaultValue) : $defaultValue
          );
      }
code_tokens: protected function getFieldValue ( $ field ) { if ( is_string ( $ field ) ) { if ( ! isset ( $ this -> allFields [ $ field ] ) ) { throw new ApplicationException ( Lang :: get ( 'backend::lang.form.missing_definition' , compact ( 'field' ) ) ) ; } $ field = $ this -> allFields [ $ field ] ; } $ defaultValue = ! $ this -> model -> exists ? $ field -> getDefaultFromData ( $ this -> data ) : null ; return $ field -> getValueFromData ( $ this -> data , is_string ( $ defaultValue ) ? trans ( $ defaultValue ) : $ defaultValue ) ; }
docstring: Looks up the field value.
  @param mixed $field
  @return string
docstring_tokens: Looks up the field value .