4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8 namespace Dompdf\FrameDecorator
;
14 * Table row group decorator
16 * Overrides split() method for tbody, thead & tfoot elements
20 class TableRowGroup
extends AbstractFrameDecorator
26 * @param Frame $frame Frame to decorate
27 * @param Dompdf $dompdf Current dompdf instance
29 function __construct(Frame
$frame, Dompdf
$dompdf)
31 parent
::__construct($frame, $dompdf);
35 * Override split() to remove all child rows and this element from the cellmap
38 * @param bool $force_pagebreak
42 function split(Frame
$child = null, $force_pagebreak = false)
44 if (is_null($child)) {
49 // Remove child & all subsequent rows from the cellmap
50 $cellmap = $this->get_parent()->get_cellmap();
54 $cellmap->remove_row($iter);
55 $iter = $iter->get_next_sibling();
58 // If we are splitting at the first child remove the
59 // table-row-group from the cellmap as well
60 if ($child === $this->get_first_child()) {
61 $cellmap->remove_row_group($this);
66 $cellmap->update_row_group($this, $child->get_prev_sibling());
67 parent
::split($child);