36 $count = $this->
count();
37 for ($i = $count; $i < $colCount; $i ++) {
39 $item->setTagName($this->_tdTagName);
45 return $this->
count();
55 $count = $this->
count();
56 $td =
new HtmlTD(
"", $value, $this->_tdTagName);
57 $td->setContainer($this->_container, $this->_row, $count);
80 $this->_container = $container;
112 $count = $this->
count();
113 if (! \is_array($values)) {
114 $values = \array_fill(0, $count, $values);
117 $values = \array_values($values);
120 $count = \min(\
sizeof($values), $count);
122 for ($i = 0; $i < $count; $i ++) {
123 $cell = $this->content[$i];
124 $callback($cell, $values[$i]);
136 public function delete($index) {
142 return $this->
getItem($colIndex)->mergeCol();
146 $row = $this->
getItem($colIndex);
148 $this->
getItem($colIndex)->mergeRow();
154 if ($this->_container->_isMerged() !==
true)
157 $rows = $this->_container->getContent();
159 $max = \min($colIndex, $rows[$i]->
count());
160 for ($j = 0; $j < $max; $j ++) {
161 $rowspan = $rows[$i]->getItem($j)->getRowspan();
162 if ($rowspan + $i > $this->_row)
166 if ($pos > $colIndex)
168 $count = $this->
count();
169 for ($i = 0; $i < $count; $i ++) {
170 $pos += $this->content[$i]->getColspan();
171 if ($pos >= $colIndex + 1)
179 foreach ($cells as $cell) {
180 $cell->conditionalCellFormat($callback, $format);
186 if ($callback($this)) {
194 foreach ($cells as $cell) {
195 if (\strpos($cell->getContent(), $needle) !==
false)
208 foreach ($cells as $cell) {
209 $cell->apply($callback);
215 $this->
getItem($colIndex)->toDelete();
220 $cell = $this->
getItem($colIndex);
221 $cell->addClass(
'rowspanned');
222 $cell->setContent(
'');
conditionalCellFormat($callback, $format)
setContainer($container, $row)
Define the container (HtmlTableContent) and the num of the row.
addToProperty($name, $value, $separator=" ")
setTdTagName($tagName="td")
addItem($item)
adds and returns an item
setValues($values=array())
Sets values to the row cols.
addValues($values=array())
Adds values to the row cols.
_addOrSetValues($values, $callback)
Sets or adds values to the row cols.
static isAssociative($array)
Base class for Semantic Html collections.
conditionalRowFormat($callback, $format)
getColPosition($colIndex)