Source of file BaseGridBlock.php
Size: 0,862 Bytes - Last Modified: 2021-12-24T06:34:06+00:00
/var/www/docs.ssmods.com/process/src/code/libraries/grid/BaseGridBlock.php
12345678910111213141516171819202122232425262728293031323334353637383940414243 | <?php class BaseGridBlock extends BaseGridGroup { protected $empty_cells_counting_enabled = true; public function addCell(BaseGridCell $grid_cell) { $this->addGroup($grid_cell); } public function getCells() { return $this->groups; } public function enableEmptyCellsCounting($empty_cells_counting_enabled) { $this->empty_cells_counting_enabled = $empty_cells_counting_enabled; } public function getEmptyCellsCount() { if ($this->empty_cells_counting_enabled) { $result = 0; foreach ($this->getCells() as $cell) { if ($cell->isEmpty()) { $result++; } } return $result; } else { return 0; } } } |