ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Blog\Settings\SettingsManager Class Reference
+ Collaboration diagram for ILIAS\Blog\Settings\SettingsManager:

Public Member Functions

 __construct (protected InternalDataService $data, protected InternalRepoService $repo, protected InternalDomainService $domain)
 
 create (Settings $settings)
 
 update (Settings $settings)
 
 getByObjId (int $id)
 
 clone ($from_id, $to_id)
 
 saveOrder (int $id, array $order)
 
 getOrderingOptions (Settings $settings, bool $in_repository)
 

Detailed Description

Definition at line 27 of file SettingsManager.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 29 of file SettingsManager.php.

33 {
34 }

Member Function Documentation

◆ clone()

ILIAS\Blog\Settings\SettingsManager::clone (   $from_id,
  $to_id 
)

Definition at line 52 of file SettingsManager.php.

52 : void
53 {
54 $settings = $this->repo->settings()->getByObjId($from_id);
55 $settings = $settings->withId($to_id);
56 $this->update($settings);
57 }

References ILIAS\Blog\Settings\SettingsManager\update().

+ Here is the call graph for this function:

◆ create()

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

Definition at line 37 of file SettingsManager.php.

37 : void
38 {
39 $this->repo->settings()->create($settings);
40 }

◆ getByObjId()

ILIAS\Blog\Settings\SettingsManager::getByObjId ( int  $id)

Definition at line 47 of file SettingsManager.php.

47 : ?Settings
48 {
49 return $this->repo->settings()->getByObjId($id);
50 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id.

◆ getOrderingOptions()

ILIAS\Blog\Settings\SettingsManager::getOrderingOptions ( Settings  $settings,
bool  $in_repository 
)

Definition at line 64 of file SettingsManager.php.

67 : array {
68 $lng = $this->domain->lng();
69 $order_options = [];
70 foreach ($settings->getOrder() as $item) {
71 $order_options[$item] = $lng->txt("blog_" . $item);
72 }
73
74 $type = "navigation";
75 if (!isset($order_options[$type])) {
76 $order_options[$type] = $lng->txt("blog_" . $type);
77 }
78
79 if ($in_repository) {
80 $type = "authors";
81 if (!isset($order_options[$type])) {
82 $order_options[$type] = $lng->txt("blog_" . $type);
83 }
84 }
85
86 $type = "keywords";
87 if (!isset($order_options[$type])) {
88 $order_options[$type] = $lng->txt("blog_" . $type);
89 }
90
91 return $order_options;
92 }
global $lng
Definition: privfeed.php:31

References $lng.

◆ saveOrder()

ILIAS\Blog\Settings\SettingsManager::saveOrder ( int  $id,
array  $order 
)

Definition at line 59 of file SettingsManager.php.

59 : void
60 {
61 $this->repo->settings()->saveOrder($id, $order);
62 }

References $id.

◆ update()

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

Definition at line 42 of file SettingsManager.php.

42 : void
43 {
44 $this->repo->settings()->update($settings);
45 }

Referenced by ILIAS\Blog\Settings\SettingsManager\clone().

+ Here is the caller graph for this function:

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