Definition at line 30 of file Row.php.
◆ appendColumn()
◆ createColumn()
createColumn |
( |
|
$content, |
|
|
array |
$options = null |
|
) |
| |
Create a new column and append it to the row
- Parameters
-
string | $content | |
array | $options | |
- Returns
- Zend_Text_Table_Row
Definition at line 53 of file Row.php.
63 #require_once 'Zend/Text/Table/Column.php'; appendColumn(Zend_Text_Table_Column $column)
◆ getColumn()
Get a column by it's index
Returns null, when the index is out of range
- Parameters
-
- Returns
- Zend_Text_Table_Column|null
Definition at line 93 of file Row.php.
95 if (!isset($this->_columns[
$index])) {
99 return $this->_columns[
$index];
◆ getColumns()
Get all columns of the row
- Returns
- array
Definition at line 107 of file Row.php.
◆ getColumnWidths()
Get the widths of all columns, which were rendered last
- Exceptions
-
- Returns
- integer
Definition at line 118 of file Row.php.
120 if ($this->_columnWidths ===
null) {
121 #require_once 'Zend/Text/Table/Exception.php';
◆ render()
Render the row
- Parameters
-
- Exceptions
-
- Returns
- string
Definition at line 137 of file Row.php.
142 $this->_columnWidths = array();
146 if (count($this->_columns) === 0) {
147 #require_once 'Zend/Text/Table/Column.php'; 152 $renderedColumns = array();
155 foreach ($this->_columns as $column) {
157 $colSpan = $column->getColSpan();
160 if (($colNum + $colSpan) > count($columnWidths)) {
161 #require_once 'Zend/Text/Table/Exception.php'; 166 $columnWidth = ($colSpan - 1 + array_sum(array_slice($columnWidths,
171 $result = explode(
"\n", $column->render($columnWidth, $padding));
174 $this->_columnWidths[] = $columnWidth;
178 $maxHeight = max($maxHeight, count(
$result));
186 if ($colNum < count($columnWidths)) {
187 $remainingWidth = (count($columnWidths) - $colNum - 1) +
188 array_sum(array_slice($columnWidths,
190 $renderedColumns[] = array(str_repeat(
' ', $remainingWidth));
192 $this->_columnWidths[] = $remainingWidth;
197 for ($line = 0; $line < $maxHeight; $line++) {
200 foreach ($renderedColumns as
$index => $renderedColumn) {
201 if (isset($renderedColumn[$line]) ===
true) {
202 $result .= $renderedColumn[$line];
appendColumn(Zend_Text_Table_Column $column)
◆ $_columns
◆ $_columnWidths
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Text/Table/Row.php