PluginProbe
Tableberg – Simple Gutenberg Table Block / 1.1.5
Tableberg – Simple Gutenberg Table Block v1.1.5
1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 trunk 0.0.2 0.2.1 0.3.2 0.3.3 0.4.1 0.5.0 0.5.1 0.5.2 0.5.3 0.5.4 0.5.5 0.5.6 0.5.7 All 42 releases
← All changes | renderer/Cell/CellRenderContext.php +21 -1 1.1.21.1.5 View file →
@@ -117,8 +117,17 @@
117 117 * @var bool
118 118 */
119 119 public $isEmpty;
120 120
121 + /** @var string */
122 + public $innerBorderType;
123 +
124 + /** @var int */
125 + public $totalRows;
126 +
127 + /** @var int */
128 + public $totalCols;
129 +
121 130 /**
122 131 * @param mixed $row
123 132 * @param mixed $col
124 133 * @param mixed $rowSpan
@@ -133,8 +142,11 @@
133 142 * @param string|null $height
134 143 * @param bool $stickyHeader
135 144 * @param string|null $className
136 145 * @param bool $isEmpty
146 + * @param string $innerBorderType
147 + * @param int $totalRows
148 + * @param int $totalCols
137 149 * @return self
138 150 */
139 151 public static function create(
140 152 $row,
@@ -152,9 +164,12 @@
152 164 $stickyHeader = false,
153 165 $stickyFirstCol = false,
154 166 $className = null,
155 167 $cellAttrs = [],
156 - $isEmpty = false
168 + $isEmpty = false,
169 + $innerBorderType = '',
170 + $totalRows = 0,
171 + $totalCols = 0
157 172 ) {
158 173 $instance = new self();
159 174
160 175 $instance->hasCellCoords = is_numeric($row) && is_numeric($col);
@@ -233,8 +248,13 @@
233 248 $instance->height = getStringOrNull($height);
234 249 $instance->stickyHeader = (bool) $stickyHeader;
235 250 $instance->stickyFirstCol = (bool) $stickyFirstCol;
236 251 $instance->isEmpty = (bool) $isEmpty;
252 + $instance->innerBorderType = in_array($innerBorderType, ['row', 'col'], true)
253 + ? $innerBorderType
254 + : '';
255 + $instance->totalRows = max(0, (int) $totalRows);
256 + $instance->totalCols = max(0, (int) $totalCols);
237 257 $instance->className = trim((string) (getStringOrNull($className) ?? ''));
238 258
239 259 return $instance;
240 260 }