src/Table.php
public function getDataRowHTML()
    {
        $output = [];
        foreach ($this->columns as $name => $column) {

            // If multiple formatters are defined, use the first for the header cell

            if (!is_int($name)) {
                $field = $this->model->getElement($name);
            } else {
                $field = null;
            }

            if (!is_array($column)) {
                $column = [$column];
            }

            // we need to smartly wrap things up
            $cell = null;
            $cnt = count($column);
            $td_attr = [];
            foreach ($column as $c) {
                if (--$cnt) {
                    $html = $c->getDataCellTemplate($field);
                    $td_attr = $c->getTagAttributes('body', $td_attr);
                } else {
                    // Last formatter, ask it to give us whole rendering
                    $html = $c->getDataCellHTML($field, $td_attr);
                }

                if ($cell) {
                    if ($name) {
                        // if name is set, we can wrap things
                        $cell = str_replace('{$'.$name.'}', $cell, $html);
                    } else {
                        $cell = $cell.' '.$html;
                    }
                } else {
                    $cell = $html;
                }
            }

            $output[] = $cell;
        }

        return implode('', $output);
    }
public function getDataRowHTML()
    {
        $output = [];
        foreach ($this->columns as $name => $column) {

            // If multiple formatters are defined, use the first for the header cell

            if (!is_int($name)) {
                $field = $this->model->getElement($name);
            } else {
                $field = null;
            }

            if (!is_array($column)) {
                $column = [$column];
            }

            // we need to smartly wrap things up
            $cell = null;
            $cnt = count($column);
            $td_attr = [];
            foreach ($column as $c) {
                if (--$cnt) {
                    $html = $c->getDataCellTemplate($field);
                    $td_attr = $c->getTagAttributes('body', $td_attr);
                } else {
                    // Last formatter, ask it to give us whole rendering
                    $html = $c->getDataCellHTML($field, $td_attr);
                }

                if ($cell) {
                    if ($name) {
                        // if name is set, we can wrap things
                        $cell = str_replace('{$'.$name.'}', $cell, $html);
                    } else {
                        $cell = $cell.' '.$html;
                    }
                } else {
                    $cell = $html;
                }
            }

            $output[] = $cell;
        }

        return implode('', $output);
    }
public function getDataRowHTML ( ) { $ output = [ ] ; foreach ( $ this -> columns as $ name => $ column ) { // If multiple formatters are defined, use the first for the header cell if ( ! is_int ( $ name ) ) { $ field = $ this -> model -> getElement ( $ name ) ; } else { $ field = null ; } if ( ! is_array ( $ column ) ) { $ column = [ $ column ] ; } // we need to smartly wrap things up $ cell = null ; $ cnt = count ( $ column ) ; $ td_attr = [ ] ; foreach ( $ column as $ c ) { if ( -- $ cnt ) { $ html = $ c -> getDataCellTemplate ( $ field ) ; $ td_attr = $ c -> getTagAttributes ( 'body' , $ td_attr ) ; } else { // Last formatter, ask it to give us whole rendering $ html = $ c -> getDataCellHTML ( $ field , $ td_attr ) ; } if ( $ cell ) { if ( $ name ) { // if name is set, we can wrap things $ cell = str_replace ( '{$' . $ name . '}' , $ cell , $ html ) ; } else { $ cell = $ cell . ' ' . $ html ; } } else { $ cell = $ html ; } } $ output [ ] = $ cell ; } return implode ( '' , $ output ) ; }
Collects cell templates from all the columns and combine them into row template.

@return string
Collects cell templates from all the columns and combine them into row template .