ILIAS  release_8 Revision v8.24
class.ilBiblOverviewModelFactory.php
Go to the documentation of this file.
1<?php
24{
25 protected static array $models = [];
26
27
32 private function getAllOverviewModels(): array
33 {
34 if (self::$models !== []) {
35 return self::$models;
36 }
40 $overviewModels = ilBiblOverviewModel::get();
41 $overviewModelsArray = array();
42 foreach ($overviewModels as $model) {
43 if ($model->getLiteratureType()) {
44 $overviewModelsArray[$model->getFileTypeId()][$model->getLiteratureType()] = $model->getPattern();
45 } else {
46 $overviewModelsArray[$model->getFileTypeId()] = $model->getPattern();
47 }
48 }
49 self::$models = $overviewModelsArray;
50
51 return $overviewModelsArray;
52 }
53
54
59 {
60 $models = $this->getAllOverviewModels();
61
62 $id = $type->getId();
63
64 return $models[$id];
65 }
66}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAllOverviewModelsByType(ilBiblTypeInterface $type)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$type