ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\Wiki\Settings\SettingsManager Class Reference
+ Collaboration diagram for ILIAS\Wiki\Settings\SettingsManager:

Public Member Functions

 __construct (protected InternalDataService $data, protected InternalRepoService $repo, protected InternalDomainService $domain)
 
 create (Settings $settings)
 
 update (Settings $settings)
 
 getById (int $id)
 
 getStartPageOptions (int $ref_id)
 
 getStartPageId (Settings $settings)
 

Protected Attributes

ILIAS Notes Service $notes
 

Detailed Description

Definition at line 27 of file SettingsManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Wiki\Settings\SettingsManager::__construct ( protected InternalDataService  $data,
protected InternalRepoService  $repo,
protected InternalDomainService  $domain 
)

Definition at line 31 of file SettingsManager.php.

References $DIC.

35  {
36  global $DIC;
37  $this->notes = $DIC->notes();
38  }
global $DIC
Definition: shib_login.php:26

Member Function Documentation

◆ create()

ILIAS\Wiki\Settings\SettingsManager::create ( Settings  $settings)

Definition at line 40 of file SettingsManager.php.

40  : void
41  {
42  $this->repo->settings()->create($settings);
43  }

◆ getById()

ILIAS\Wiki\Settings\SettingsManager::getById ( int  $id)

Definition at line 51 of file SettingsManager.php.

51  : ?Settings
52  {
53  return $this->repo->settings()->getById($id);
54  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ getStartPageId()

ILIAS\Wiki\Settings\SettingsManager::getStartPageId ( Settings  $settings)

Definition at line 66 of file SettingsManager.php.

References ILIAS\Wiki\Settings\Settings\getId(), and ILIAS\Wiki\Settings\Settings\getStartPage().

66  : ?int
67  {
68  return \ilWikiPage::_getPageIdForWikiTitle(
69  $settings->getId(),
70  $settings->getStartPage()
71  );
72  }
+ Here is the call graph for this function:

◆ getStartPageOptions()

ILIAS\Wiki\Settings\SettingsManager::getStartPageOptions ( int  $ref_id)

Definition at line 56 of file SettingsManager.php.

References ilStr\shortenTextExtended().

56  : array
57  {
58  $pm = $this->domain->page()->page($ref_id);
59  $options = [];
60  foreach ($pm->getWikiPages() as $page) {
61  $options[(string) $page->getId()] = \ilStr::shortenTextExtended($page->getTitle(), 60, true);
62  }
63  return $options;
64  }
$ref_id
Definition: ltiauth.php:65
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
+ Here is the call graph for this function:

◆ update()

ILIAS\Wiki\Settings\SettingsManager::update ( Settings  $settings)

Definition at line 45 of file SettingsManager.php.

References ILIAS\Wiki\Settings\Settings\getId(), and ILIAS\Wiki\Settings\Settings\getPublicNotes().

45  : void
46  {
47  $this->repo->settings()->update($settings);
48  $this->notes->domain()->activateComments($settings->getId(), $settings->getPublicNotes());
49  }
+ Here is the call graph for this function:

Field Documentation

◆ $notes

ILIAS Notes Service ILIAS\Wiki\Settings\SettingsManager::$notes
protected

Definition at line 29 of file SettingsManager.php.


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