ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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

References $DIC.

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

References $id.

◆ getStartPageId()

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

Definition at line 66 of file SettingsManager.php.

66 : ?int
67 {
68 return \ilWikiPage::_getPageIdForWikiTitle(
69 $settings->getId(),
70 $settings->getStartPage()
71 );
72 }

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

+ 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.

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 }
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
$ref_id
Definition: ltiauth.php:66

References $ref_id, and ilStr\shortenTextExtended().

+ Here is the call graph for this function:

◆ update()

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

Definition at line 45 of file SettingsManager.php.

45 : void
46 {
47 $this->repo->settings()->update($settings);
48 $this->notes->domain()->activateComments($settings->getId(), $settings->getPublicNotes());
49 }

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

+ 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: