ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilPCGridCell.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 require_once("./Services/COPage/classes/class.ilPageContent.php");
6 
15 {
19  public function init()
20  {
21  $this->setType("gcell");
22  }
23 
27  public function deleteCell()
28  {
29  $grid_cell = $this->getNode();
30  $grid_cell->unlink($grid_cell);
31  }
32 
36  public function moveCellRight()
37  {
38  $grid_cell = $this->getNode();
39  $next = $grid_cell->next_sibling();
40  $next_copy = $next->clone_node(true);
41  $grid_cell->insert_before($next_copy, $grid_cell);
42  $next->unlink($next);
43  }
44 
48  public function moveCellLeft()
49  {
50  $grid_cell = $this->getNode();
51  $prev = $grid_cell->previous_sibling();
52  $grid_cell_copy = $grid_cell->clone_node(true);
53  $prev->insert_before($grid_cell_copy, $prev);
54  $grid_cell->unlink($grid_cell);
55  }
56 }
& getNode()
Get xml node of page content.
setType($a_type)
Set Type.
init()
Init page content component.
Class ilPageContent.
deleteCell()
delete tab
moveCellRight()
Move cell right.
Cell of a grid.
moveCellLeft()
Move cell left.