public function tableContent($fields, $instance)
    {
        $output = '';
        foreach ($fields as $f) {
            if ($this->isIdField($f)) {
                $related = $this->getRelatedField($f);
                $relation = $instance->$related;
                $field = $this->getPrimaryField($relation);
                if (strpos($field, ',')) {
                    $subfields = explode(',', $field);
                    $display = '';
                    foreach ($subfields as $sf) {
                        $display .= $relation->$sf.' ';
                    }
                } else {
                    $display = $relation->$field;
                }
                $output .= '<td>'.$display.'</td>';
            } else {
                $output .= '<td>'.$instance->$f.'</td>';
            }
        }

        return $output;
    }
public function tableContent($fields, $instance)
    {
        $output = '';
        foreach ($fields as $f) {
            if ($this->isIdField($f)) {
                $related = $this->getRelatedField($f);
                $relation = $instance->$related;
                $field = $this->getPrimaryField($relation);
                if (strpos($field, ',')) {
                    $subfields = explode(',', $field);
                    $display = '';
                    foreach ($subfields as $sf) {
                        $display .= $relation->$sf.' ';
                    }
                } else {
                    $display = $relation->$field;
                }
                $output .= '<td>'.$display.'</td>';
            } else {
                $output .= '<td>'.$instance->$f.'</td>';
            }
        }

        return $output;
    }
public function tableContent ( $ fields , $ instance ) { $ output = '' ; foreach ( $ fields as $ f ) { if ( $ this -> isIdField ( $ f ) ) { $ related = $ this -> getRelatedField ( $ f ) ; $ relation = $ instance -> $ related ; $ field = $ this -> getPrimaryField ( $ relation ) ; if ( strpos ( $ field , ',' ) ) { $ subfields = explode ( ',' , $ field ) ; $ display = '' ; foreach ( $ subfields as $ sf ) { $ display .= $ relation -> $ sf . ' ' ; } } else { $ display = $ relation -> $ field ; } $ output .= '<td>' . $ display . '</td>' ; } else { $ output .= '<td>' . $ instance -> $ f . '</td>' ; } } return $ output ; }
Output the instances fields into table content format.

@param array $fields
@param $instance

@return string
Output the instances fields into table content format .