ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
SettingsManager.php
Go to the documentation of this file.
1<?php
2
19declare(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}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Author: Alexander Killing killing@leifos.de
__construct(protected InternalDataService $data, protected InternalRepoService $repo, protected InternalDomainService $domain)