ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.DomainService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\COPage\PC;
22 
33 
38 {
40  protected ?PCDefinition $def;
44 
45  public function __construct(
46  InternalDataService $data_service,
47  InternalRepoService $repo_service,
48  InternalDomainService $domain_service,
49  ?PCDefinition $pc_definition = null
50  ) {
51  $this->repo_service = $repo_service;
52  $this->data_service = $data_service;
53  $this->domain_service = $domain_service;
54  $this->def = $pc_definition;
55  $this->pc_factory = new PCFactory(
56  $this->definition()
57  );
58  }
59 
60  public function getByNode(
61  ?\DOMNode $node,
62  \ilPageObject $page_object
63  ): ?\ilPageContent {
64  return $this->pc_factory->getByNode($node, $page_object);
65  }
66 
67  public function definition(): PCDefinition
68  {
69  return $this->def ?? new PCDefinition();
70  }
71 
72  public function paragraph(): ParagraphManager
73  {
74  return new ParagraphManager();
75  }
76 
77  public function fileList(): FileListManager
78  {
79  return new FileListManager();
80  }
81 
82  public function mediaObject(): MediaObjectManager
83  {
84  return new MediaObjectManager();
85  }
86 
87  public function question(): QuestionManager
88  {
89  return new QuestionManager();
90  }
91 
92  public function interactiveImage(): InteractiveImage\IIMManager
93  {
94  return new InteractiveImage\IIMManager(
95  $this->domain_service
96  );
97  }
98 
99  public function resources(): ResourcesManager
100  {
101  return new ResourcesManager();
102  }
103 
104 }
getByNode(?\DOMNode $node, \ilPageObject $page_object)
InternalDomainService $domain_service
Content object of ilPageObject (see ILIAS DTD).
Repository internal repo service.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Repository internal data service.
__construct(InternalDataService $data_service, InternalRepoService $repo_service, InternalDomainService $domain_service, ?PCDefinition $pc_definition=null)