You are here

private static function kintParser::_decorateCell in Devel 8

Same name and namespace in other branches
  1. 8.2 kint/kint/inc/kintParser.class.php \kintParser::_decorateCell()
1 call to kintParser::_decorateCell()
kintParser::_parse_array in kint/kint/inc/kintParser.class.php

File

kint/kint/inc/kintParser.class.php, line 200

Class

kintParser

Code

private static function _decorateCell(kintVariableData $kintVar) {
  if ($kintVar->extendedValue !== null || !empty($kintVar->_alternatives)) {
    return '<td>' . Kint_Decorators_Rich::decorate($kintVar) . '</td>';
  }
  $output = '<td';
  if ($kintVar->value !== null) {
    $output .= ' title="' . $kintVar->type;
    if ($kintVar->size !== null) {
      $output .= " (" . $kintVar->size . ")";
    }
    $output .= '">' . $kintVar->value;
  }
  else {
    $output .= '>';
    if ($kintVar->type !== 'NULL') {
      $output .= '<u>' . $kintVar->type;
      if ($kintVar->size !== null) {
        $output .= "(" . $kintVar->size . ")";
      }
      $output .= '</u>';
    }
    else {
      $output .= '<u>NULL</u>';
    }
  }
  return $output . '</td>';
}