original_string: public function export_value() {
          $value = $this->get_value();
  
          if ($this->is_empty($value)) {
              return null;
          }
  
          if ($this->datafield() === 'intvalue') {
              return (int)$value;
          } else if ($this->datafield() === 'decvalue') {
              return (float)$value;
          } else if ($this->datafield() === 'value') {
              return format_text($value, $this->get('valueformat'), ['context' => $this->get_context()]);
          } else {
              return format_string($value, true, ['context' => $this->get_context()]);
          }
      }
code: public function export_value() {
          $value = $this->get_value();
  
          if ($this->is_empty($value)) {
              return null;
          }
  
          if ($this->datafield() === 'intvalue') {
              return (int)$value;
          } else if ($this->datafield() === 'decvalue') {
              return (float)$value;
          } else if ($this->datafield() === 'value') {
              return format_text($value, $this->get('valueformat'), ['context' => $this->get_context()]);
          } else {
              return format_string($value, true, ['context' => $this->get_context()]);
          }
      }
code_tokens: public function export_value ( ) { $ value = $ this -> get_value ( ) ; if ( $ this -> is_empty ( $ value ) ) { return null ; } if ( $ this -> datafield ( ) === 'intvalue' ) { return ( int ) $ value ; } else if ( $ this -> datafield ( ) === 'decvalue' ) { return ( float ) $ value ; } else if ( $ this -> datafield ( ) === 'value' ) { return format_text ( $ value , $ this -> get ( 'valueformat' ) , [ 'context' => $ this -> get_context ( ) ] ) ; } else { return format_string ( $ value , true , [ 'context' => $ this -> get_context ( ) ] ) ; } }
docstring: Returns value in a human-readable format or default value if data record is not present
  
  This is the default implementation that most likely needs to be overridden
  
  @return mixed|null value or null if empty
docstring_tokens: Returns value in a human - readable format or default value if data record is not present