ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager Class Reference
+ Collaboration diagram for ILIAS\MetaData\OERHarvester\Settings\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\MetaData\OERHarvester\Settings\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\MetaData\OERHarvester\Settings\Settings\SettingsManager::clone (   $from_id,
  $to_id 
)

Definition at line 52 of file SettingsManager.php.

References ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\update().

52  : void
53  {
54  $settings = $this->repo->settings()->getByObjId($from_id);
55  $settings = $settings->withId($to_id);
56  $this->update($settings);
57  }
+ Here is the call graph for this function:

◆ create()

ILIAS\MetaData\OERHarvester\Settings\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\MetaData\OERHarvester\Settings\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

◆ getOrderingOptions()

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

Definition at line 64 of file SettingsManager.php.

References $lng, and ILIAS\MetaData\OERHarvester\Settings\Settings\Settings\getOrder().

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
+ Here is the call graph for this function:

◆ saveOrder()

ILIAS\MetaData\OERHarvester\Settings\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  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ update()

ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager::update ( Settings  $settings)

Definition at line 42 of file SettingsManager.php.

Referenced by ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\clone().

42  : void
43  {
44  $this->repo->settings()->update($settings);
45  }
+ Here is the caller graph for this function:

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