ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
SettingsManager.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
28 {
29  public function __construct(
30  protected InternalDataService $data,
31  protected InternalRepoService $repo,
32  protected InternalDomainService $domain
33  ) {
34  }
35 
36 
37  public function create(Settings $settings): void
38  {
39  $this->repo->settings()->create($settings);
40  }
41 
42  public function update(Settings $settings): void
43  {
44  $this->repo->settings()->update($settings);
45  }
46 
47  public function getByObjId(int $id): ?Settings
48  {
49  return $this->repo->settings()->getById($id);
50  }
51 
52  public function clone($from_id, $to_id): void
53  {
54  $settings = $this->repo->settings()->getById($from_id);
55  $settings = $settings->withId($to_id);
56  $this->update($settings);
57  }
58 }
__construct(protected InternalDataService $data, protected InternalRepoService $repo, protected InternalDomainService $domain)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23