ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPCGridCell.php
Go to the documentation of this file.
1<?php
2
24{
28 public function init(): void
29 {
30 $this->setType("gcell");
31 }
32
33 public function deleteCell(): void
34 {
35 $grid_cell = $this->getDomNode();
36 $grid_cell->parentNode->removeChild($grid_cell);
37 }
38
39 public function moveCellRight(): void
40 {
41 $grid_cell = $this->getDomNode();
42 $next = $grid_cell->nextSibling;
43 $next_copy = $next->cloneNode(true);
44 $grid_cell->parentNode->insertBefore($next_copy, $grid_cell);
45 $next->parentNode->removeChild($next);
46 }
47
48 public function moveCellLeft(): void
49 {
50 $grid_cell = $this->getDomNode();
51 $prev = $grid_cell->previousSibling;
52 $grid_cell_copy = $grid_cell->cloneNode(true);
53 $prev->parentNode->insertBefore($grid_cell_copy, $prev);
54 $grid_cell->parentNode->removeChild($grid_cell);
55 }
56}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
init()
Init page content component.
Content object of ilPageObject (see ILIAS DTD).
setType(string $a_type)
Set Type.