ILIAS  trunk Revision v11.0_alpha-1851-ga8564da6fed
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilPCTableModelProvider Class Reference
+ Inheritance diagram for ilPCTableModelProvider:
+ Collaboration diagram for ilPCTableModelProvider:

Public Member Functions

 getModels (DomUtil $dom_util, \ilPageObject $page)
 

Detailed Description

Definition at line 22 of file class.ilPCTableModelProvider.php.

Member Function Documentation

◆ getModels()

ilPCTableModelProvider::getModels ( DomUtil  $dom_util,
\ilPageObject  $page 
)

Implements ILIAS\COPage\Editor\Components\PageComponentModelProvider.

Definition at line 24 of file class.ilPCTableModelProvider.php.

References ilPageObject\getContentObjectForPcId(), ilPageObject\getDomDoc(), null, and ILIAS\COPage\Dom\DomUtil\path().

27  : array {
28  $models = [];
29 
30  foreach ($dom_util->path($page->getDomDoc(), "//Table") as $node) {
31  if ($node->getAttribute("DataTable") !== "y") {
32  continue;
33  }
34 
35  $par = $node->parentNode;
36  $pc_id = $par->getAttribute("PCID");
37 
38  $co = $page->getContentObjectForPcId($pc_id);
39  if ($co !== null) {
40  $co_model = $co->getModel();
41  if ($co_model !== null) {
42  $models[$pc_id] = $co_model;
43  }
44  }
45  }
46 
47  return $models;
48  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
path(\DOMDocument $doc, string $path)
+ Here is the call graph for this function:

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