ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 
 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)
 
 setItemStyleClass (string $a_val)
 
 getStyleClass ()
 
 getItemStyleClass ()
 
- Public Member Functions inherited from ilPageContent
 __construct (ilPageObject $a_pg_obj, ?PageManagerInterface $page_manager=null, ?ObjectAdapterInterface $object_adapter=null)
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 init ()
 Init object. More...
 
 getType ()
 
 getDomNode ()
 
 getDomDoc ()
 
 setDomNode (DOMNode $node)
 
 getChildNode ()
 
 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...
 
 getNewPageContentNode ()
 
 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContent
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...
 
- Data Fields inherited from ilPageContent
string $hier_id = ""
 
DOMNode $dom_node = null
 
string $page_lang = ""
 
- Protected Member Functions inherited from ilPageContent
 getPageManager ()
 
 setType (string $a_type)
 Set Type. More...
 
 hasNode ()
 
 createInitialChildNode (string $hier_id, string $pc_id, string $child, array $child_attributes=[])
 
- Protected Attributes inherited from ilPageContent
DOMDocument $dom_doc
 
ILIAS COPage InternalDomainService $domain
 
string $pcid
 
string $type = ""
 
ilPageObject $pg_obj
 
string $file_download_link
 
string $fullscreen_link
 
string $sourcecode_download_script
 
ilLogger $log
 
string $profile_back_url = ""
 
ILIAS COPage Dom DomUtil $dom_util
 
PageManagerInterface $page_manager = null
 
ObjectAdapterInterface $object = null
 

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 44 of file class.ilPCList.php.

References ilPageContent\getChildNode().

44  : void
45  {
46  for ($i = 1; $i <= $a_nr; $i++) {
47  $new_item = $this->dom_doc->createElement("ListItem");
48  $new_item = $this->getChildNode()->appendChild($new_item);
49  }
50  }
+ Here is the call graph for this function:

◆ create()

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

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

References ilPageContent\createInitialChildNode().

37  : void {
38  $this->createInitialChildNode($a_hier_id, $a_pc_id, "List");
39  }
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])
+ Here is the call graph for this function:

◆ getItemStyleClass()

ilPCList::getItemStyleClass ( )

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

References ilPageContent\getChildNode().

164  : string
165  {
166  return $this->getChildNode()->getAttribute("ItemClass");
167  }
+ Here is the call graph for this function:

◆ getListType()

ilPCList::getListType ( )

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

References ilPageContent\getChildNode().

77  : string
78  {
79  if ($this->getChildNode()->getAttribute("Type") == "Unordered") {
80  return "Unordered";
81  }
82  return "Ordered";
83  }
+ Here is the call graph for this function:

◆ getNumberingType()

ilPCList::getNumberingType ( )

Get numbering type.

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

References ilPageContent\getChildNode().

93  : string
94  {
95  $nt = $this->getChildNode()->getAttribute("NumberingType");
96  switch ($nt) {
97  case "Number":
98  case "Roman":
99  case "roman":
100  case "Alphabetic":
101  case "alphabetic":
102  case "Decimal":
103  return $nt;
104 
105  default:
106  return "Number";
107  }
108  }
+ Here is the call graph for this function:

◆ getOrderType()

ilPCList::getOrderType ( )

Get order type.

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

References ilPageContent\getChildNode().

56  : string
57  {
58  if ($this->getChildNode()->getAttribute("Type") == "Unordered") {
59  return "Unordered";
60  }
61 
62  $nt = $this->getChildNode()->getAttribute("NumberingType");
63  switch ($nt) {
64  case "Number":
65  case "Roman":
66  case "roman":
67  case "Alphabetic":
68  case "alphabetic":
69  case "Decimal":
70  return $nt;
71 
72  default:
73  return "Number";
74  }
75  }
+ Here is the call graph for this function:

◆ getStartValue()

ilPCList::getStartValue ( )

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

References ilPageContent\getChildNode().

132  : int
133  {
134  return (int) $this->getChildNode()->getAttribute("StartValue");
135  }
+ Here is the call graph for this function:

◆ getStyleClass()

ilPCList::getStyleClass ( )

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

References ilPageContent\getChildNode().

159  : string
160  {
161  return $this->getChildNode()->getAttribute("Class");
162  }
+ Here is the call graph for this function:

◆ init()

ilPCList::init ( )

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

References ilPageContent\setType().

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

◆ setItemStyleClass()

ilPCList::setItemStyleClass ( string  $a_val)

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

References ilPageContent\getChildNode().

148  : void
149  {
150  if (!in_array($a_val, array("", "StandardListItem"))) {
151  $this->getChildNode()->setAttribute("ItemClass", $a_val);
152  } else {
153  if ($this->getChildNode()->hasAttribute("ItemClass")) {
154  $this->getChildNode()->removeAttribute("ItemClass");
155  }
156  }
157  }
+ Here is the call graph for this function:

◆ setListType()

ilPCList::setListType ( string  $a_val)

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

References ilPageContent\getChildNode().

85  : void
86  {
87  $this->getChildNode()->setAttribute("Type", $a_val);
88  }
+ Here is the call graph for this function:

◆ setNumberingType()

ilPCList::setNumberingType ( string  $a_val)

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

References ilPageContent\getChildNode().

110  : void
111  {
112  if ($a_val != "") {
113  $this->getChildNode()->setAttribute("NumberingType", $a_val);
114  } else {
115  if ($this->getChildNode()->hasAttribute("NumberingType")) {
116  $this->getChildNode()->removeAttribute("NumberingType");
117  }
118  }
119  }
+ Here is the call graph for this function:

◆ setStartValue()

ilPCList::setStartValue ( int  $a_val)

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

References ilPageContent\getChildNode().

121  : void
122  {
123  if ($a_val != "") {
124  $this->getChildNode()->setAttribute("StartValue", $a_val);
125  } else {
126  if ($this->getChildNode()->hasAttribute("StartValue")) {
127  $this->getChildNode()->removeAttribute("StartValue");
128  }
129  }
130  }
+ Here is the call graph for this function:

◆ setStyleClass()

ilPCList::setStyleClass ( string  $a_val)

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

References ilPageContent\getChildNode().

137  : void
138  {
139  if (!in_array($a_val, array("", "BulletedList", "NumberedList"))) {
140  $this->getChildNode()->setAttribute("Class", $a_val);
141  } else {
142  if ($this->getChildNode()->hasAttribute("Class")) {
143  $this->getChildNode()->removeAttribute("Class");
144  }
145  }
146  }
+ Here is the call graph for this function:

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