ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMediaObjectSetupAgent.php
Go to the documentation of this file.
1<?php
2
19use ILIAS\Setup;
21
26{
27 use Setup\Agent\HasNoNamedObjective;
28
29 protected Refinery\Factory $refinery;
30
31 public function __construct(
33 ) {
34 $this->refinery = $refinery;
35 }
36
37 public function hasConfig(): bool
38 {
39 return true;
40 }
41
43 {
44 return $this->refinery->custom()->transformation(function ($data) {
45 return new \ilMediaObjectSetupConfig(
46 $data["path_to_ffmpeg"] ?? null
47 );
48 });
49 }
50
51 public function getInstallObjective(?Setup\Config $config = null): Setup\Objective
52 {
54 'mobs',
56 );
57
59 return new Setup\ObjectiveCollection(
60 "Complete objectives from Services/MediaObject",
61 false,
63 $dir_objective
64 );
65 }
66
67 public function getUpdateObjective(?Setup\Config $config = null): Setup\Objective
68 {
70 if ($config !== null) {
71 return new ilMediaObjectConfigStoredObjective($config);
72 }
73 return new Setup\Objective\NullObjective();
74 }
75
77 {
79 }
80
81 public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
82 {
84 'Component MediaObjects',
85 true,
87 new ilDatabaseUpdateStepsMetricsCollectedObjective($storage, new \ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps())
88 );
89 }
90
91 public function getMigrations(): array
92 {
93 return [
94 new ilMobMigration()
95 ];
96 }
97}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
A objective collection is a objective that is achieved once all subobjectives are achieved.
A non-objective, nothing to do to achieve it...
Stores configuration for the service (currently only path to ffmpeg) in the according ini-field.
Richard Klees richard.klees@concepts-and-training.de
__construct(Refinery\Factory $refinery)
getStatusObjective(Setup\Metrics\Storage $storage)
A transformation is a function from one datatype to another.
A agent is some component that performs part of the setup process.
Definition: Agent.php:30
A configuration for the setup.
Definition: Config.php:27
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31
Storage is simple key/value store without further schema definition.
Definition: Storage.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.