ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
5require_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}
An exception for terminatinating execution or to throw for unit testing.
Cell of a grid.
moveCellRight()
Move cell right.
moveCellLeft()
Move cell left.
init()
Init page content component.
deleteCell()
delete tab
Class ilPageContent.
& getNode()
Get xml node of page content.
setType($a_type)
Set Type.