allow to add documentation on containers

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-10-03 20:30:46 +02:00
parent ec6448fe5f
commit c1c96ee08a
10 changed files with 30 additions and 4 deletions

View file

@ -35,6 +35,7 @@ class Container {
private bool $init;
private string $imageTag;
private AioVariables $aioVariables;
private string $documentation;
private DockerActionManager $dockerActionManager;
public function __construct(
@ -60,6 +61,7 @@ class Container {
bool $init,
string $imageTag,
AioVariables $aioVariables,
string $documentation,
DockerActionManager $dockerActionManager
) {
$this->identifier = $identifier;
@ -84,6 +86,7 @@ class Container {
$this->init = $init;
$this->imageTag = $imageTag;
$this->aioVariables = $aioVariables;
$this->documentation = $documentation;
$this->dockerActionManager = $dockerActionManager;
}
@ -193,4 +196,8 @@ class Container {
public function GetAioVariables() : AioVariables {
return $this->aioVariables;
}
public function GetDocumentation() : string {
return $this->documentation;
}
}

View file

@ -304,6 +304,11 @@ class ContainerDefinitionFetcher
$imageTag = $entry['image_tag'];
}
$documentation = '';
if (isset($entry['documentation'])) {
$documentation = $entry['documentation'];
}
$containers[] = new Container(
$entry['container_name'],
$displayName,
@ -327,6 +332,7 @@ class ContainerDefinitionFetcher
$init,
$imageTag,
$aioVariables,
$documentation,
$this->container->get(DockerActionManager::class)
);
}