ILIAS  release_8 Revision v8.23
ilPCList Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPCList:
+ Collaboration diagram for ilPCList:

Public Member Functions

 init ()
 
 setNode (php4DOMElement $a_node)
 
 create (ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
 
 addItems (int $a_nr)
 Add a number of items to list. More...
 
 getOrderType ()
 Get order type. More...
 
 getListType ()
 
 setListType (string $a_val)
 
 getNumberingType ()
 Get numbering type. More...
 
 setNumberingType (string $a_val)
 
 setStartValue (int $a_val)
 
 getStartValue ()
 
 setStyleClass (string $a_val)
 
 getStyleClass ()
 
- Public Member Functions inherited from ilPageContent
 __construct (ilPageObject $a_pg_obj)
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 init ()
 Init object. More...
 
 getType ()
 
 setNode (php4DOMElement $a_node)
 Set xml node of page content. More...
 
 getNode ()
 
 getJavascriptFiles (string $a_mode)
 
 getCssFiles (string $a_mode)
 
 getOnloadCode (string $a_mode)
 
 setHierId (string $a_hier_id)
 
 getHierId ()
 
 lookupHierId ()
 
 readHierId ()
 
 setPcId (string $a_pcid)
 
 getPCId ()
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setProfileBackUrl (string $url)
 
 getProfileBackUrl ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 readPCId ()
 
 writePCId (string $a_pc_id)
 
 setEnabled (string $value)
 Set Enabled value for page content component. More...
 
 enable ()
 
 disable ()
 
 isEnabled ()
 
 createPageContentNode (bool $a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 modifyPageContentPostXsl (string $a_output, string $a_mode, bool $a_abstract_only=false)
 Modify page content after xsl. More...
 
 getModel ()
 Get model as needed for the front-end editor. More...
 

Data Fields

php4DOMElement $list_node
 
- Data Fields inherited from ilPageContent
string $hier_id = ""
 
php4DOMElement $node = null
 
php4DOMDocument $dom = null
 
string $page_lang = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContent
static incEdId (string $ed_id)
 Increases an hierarchical editing id at lowest level (last number) More...
 
static decEdId (string $ed_id)
 Decreases an hierarchical editing id at lowest level (last number) More...
 
static sortHierIds (array $a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static isGreaterHierId (string $a, string $b)
 Check whether Hier ID $a is greater than Hier ID $b. More...
 
static getLangVars ()
 Get lang vars needed for editing. More...
 
static handleCopiedContent (DOMDocument $a_domdoc, bool $a_self_ass=true, bool $a_clone_mobs=false, int $new_parent_id=0, int $obj_copy_id=0)
 Handle copied content. More...
 
static afterPageUpdate (ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete (ilPageObject $a_page)
 Before page is being deleted. More...
 
static afterRepositoryCopy (ilPageObject $page, array $mapping, int $source_ref_id)
 After repository (container) copy action. More...
 
static afterPageHistoryEntry (ilPageObject $a_page, DOMDocument $a_old_domdoc, string $a_old_xml, int $a_old_nr)
 After page history entry has been created. More...
 
static deleteHistoryLowerEqualThan (string $parent_type, int $page_id, string $lang, int $delete_lower_than_nr)
 Overwrite in derived classes, if old history entries are being deleted. More...
 
- Protected Member Functions inherited from ilPageContent
 setType (string $a_type)
 Set Type. More...
 
- Protected Attributes inherited from ilPageContent
string $pcid
 
string $type = ""
 
ilPageObject $pg_obj
 
string $file_download_link
 
string $fullscreen_link
 
string $sourcecode_download_script
 
ilLogger $log
 
string $profile_back_url = ""
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilPCList

List content object (see ILIAS DTD)

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file class.ilPCList.php.

Member Function Documentation

◆ addItems()

ilPCList::addItems ( int  $a_nr)

Add a number of items to list.

Definition at line 55 of file class.ilPCList.php.

References $i.

55  : void
56  {
57  for ($i = 1; $i <= $a_nr; $i++) {
58  $new_item = $this->dom->create_element("ListItem");
59  $new_item = $this->list_node->append_child($new_item);
60  }
61  }
$i
Definition: metadata.php:41

◆ create()

ilPCList::create ( ilPageObject  $a_pg_obj,
string  $a_hier_id,
string  $a_pc_id = "" 
)

Definition at line 41 of file class.ilPCList.php.

References ilPageContent\createPageContentNode(), IL_INSERT_AFTER, and ilPageObject\insertContent().

45  : void {
46  $this->node = $this->createPageContentNode();
47  $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
48  $this->list_node = $this->dom->create_element("List");
49  $this->list_node = $this->node->append_child($this->list_node);
50  }
insertContent(ilPageContent $a_cont_obj, string $a_pos, int $a_mode=IL_INSERT_AFTER, string $a_pcid="", bool $remove_placeholder=true)
insert a content node before/after a sibling or as first child of a parent
const IL_INSERT_AFTER
createPageContentNode(bool $a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
+ Here is the call graph for this function:

◆ getListType()

ilPCList::getListType ( )

Definition at line 88 of file class.ilPCList.php.

88  : string
89  {
90  if ($this->list_node->get_attribute("Type") == "Unordered") {
91  return "Unordered";
92  }
93  return "Ordered";
94  }

◆ getNumberingType()

ilPCList::getNumberingType ( )

Get numbering type.

Definition at line 104 of file class.ilPCList.php.

104  : string
105  {
106  $nt = $this->list_node->get_attribute("NumberingType");
107  switch ($nt) {
108  case "Number":
109  case "Roman":
110  case "roman":
111  case "Alphabetic":
112  case "alphabetic":
113  case "Decimal":
114  return $nt;
115 
116  default:
117  return "Number";
118  }
119  }

◆ getOrderType()

ilPCList::getOrderType ( )

Get order type.

Definition at line 67 of file class.ilPCList.php.

67  : string
68  {
69  if ($this->list_node->get_attribute("Type") == "Unordered") {
70  return "Unordered";
71  }
72 
73  $nt = $this->list_node->get_attribute("NumberingType");
74  switch ($nt) {
75  case "Number":
76  case "Roman":
77  case "roman":
78  case "Alphabetic":
79  case "alphabetic":
80  case "Decimal":
81  return $nt;
82 
83  default:
84  return "Number";
85  }
86  }

◆ getStartValue()

ilPCList::getStartValue ( )

Definition at line 143 of file class.ilPCList.php.

143  : int
144  {
145  return (int) $this->list_node->get_attribute("StartValue");
146  }

◆ getStyleClass()

ilPCList::getStyleClass ( )

Definition at line 159 of file class.ilPCList.php.

159  : string
160  {
161  return $this->list_node->get_attribute("Class");
162  }

◆ init()

ilPCList::init ( )

Definition at line 30 of file class.ilPCList.php.

References ilPageContent\setType().

30  : void
31  {
32  $this->setType("list");
33  }
setType(string $a_type)
Set Type.
+ Here is the call graph for this function:

◆ setListType()

ilPCList::setListType ( string  $a_val)

Definition at line 96 of file class.ilPCList.php.

96  : void
97  {
98  $this->list_node->set_attribute("Type", $a_val);
99  }

◆ setNode()

ilPCList::setNode ( php4DOMElement  $a_node)

Definition at line 35 of file class.ilPCList.php.

References php4DOMNode\first_child().

35  : void
36  {
37  parent::setNode($a_node); // this is the PageContent node
38  $this->list_node = $a_node->first_child(); // this is the Table node
39  }
+ Here is the call graph for this function:

◆ setNumberingType()

ilPCList::setNumberingType ( string  $a_val)

Definition at line 121 of file class.ilPCList.php.

121  : void
122  {
123  if ($a_val != "") {
124  $this->list_node->set_attribute("NumberingType", $a_val);
125  } else {
126  if ($this->list_node->has_attribute("NumberingType")) {
127  $this->list_node->remove_attribute("NumberingType");
128  }
129  }
130  }

◆ setStartValue()

ilPCList::setStartValue ( int  $a_val)

Definition at line 132 of file class.ilPCList.php.

132  : void
133  {
134  if ($a_val != "") {
135  $this->list_node->set_attribute("StartValue", $a_val);
136  } else {
137  if ($this->list_node->has_attribute("StartValue")) {
138  $this->list_node->remove_attribute("StartValue");
139  }
140  }
141  }

◆ setStyleClass()

ilPCList::setStyleClass ( string  $a_val)

Definition at line 148 of file class.ilPCList.php.

148  : void
149  {
150  if (!in_array($a_val, array("", "BulletedList", "NumberedList"))) {
151  $this->list_node->set_attribute("Class", $a_val);
152  } else {
153  if ($this->list_node->has_attribute("Class")) {
154  $this->list_node->remove_attribute("Class");
155  }
156  }
157  }

Field Documentation

◆ $list_node

php4DOMElement ilPCList::$list_node

Definition at line 28 of file class.ilPCList.php.


The documentation for this class was generated from the following file: