protected function calculateRowHeight($row)
    {
        $rowsPerCell = array_map(function ($size, $columnWidth) {
            if (is_array($columnWidth)) {
                $rows = 0;
                foreach ($columnWidth as $width) {
                    $rows += ceil($width / ($size - 2));
                }

                return $rows;
            }

            return ceil($columnWidth / ($size - 2));
        }, $this->_columnWidths, array_map(function ($val) {
            if (is_array($val)) {
                $encodings = array_fill(0, count($val), $this->app->encoding);
                return array_map('mb_strwidth', $val, $encodings);
            }

            return mb_strwidth($val, $this->app->encoding);
        }, $row)
        );

        return max($rowsPerCell);
    }
protected function calculateRowHeight($row)
    {
        $rowsPerCell = array_map(function ($size, $columnWidth) {
            if (is_array($columnWidth)) {
                $rows = 0;
                foreach ($columnWidth as $width) {
                    $rows += ceil($width / ($size - 2));
                }

                return $rows;
            }

            return ceil($columnWidth / ($size - 2));
        }, $this->_columnWidths, array_map(function ($val) {
            if (is_array($val)) {
                $encodings = array_fill(0, count($val), $this->app->encoding);
                return array_map('mb_strwidth', $val, $encodings);
            }

            return mb_strwidth($val, $this->app->encoding);
        }, $row)
        );

        return max($rowsPerCell);
    }
protected function calculateRowHeight ( $ row ) { $ rowsPerCell = array_map ( function ( $ size , $ columnWidth ) { if ( is_array ( $ columnWidth ) ) { $ rows = 0 ; foreach ( $ columnWidth as $ width ) { $ rows += ceil ( $ width / ( $ size - 2 ) ) ; } return $ rows ; } return ceil ( $ columnWidth / ( $ size - 2 ) ) ; } , $ this -> _columnWidths , array_map ( function ( $ val ) { if ( is_array ( $ val ) ) { $ encodings = array_fill ( 0 , count ( $ val ) , $ this -> app -> encoding ) ; return array_map ( 'mb_strwidth' , $ val , $ encodings ) ; } return mb_strwidth ( $ val , $ this -> app -> encoding ) ; } , $ row ) ) ; return max ( $ rowsPerCell ) ; }
Calculate the height of a row.

@param array $row
@return int maximum row per cell
@see \Yiisoft\Yii\Console\Widgets\Table::render()
Calculate the height of a row .