ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilBiblOverviewModelFactory.php
Go to the documentation of this file.
1<?php
2
25{
26 protected static array $models = [];
27
28
33 private function getAllOverviewModels(): array
34 {
35 if (self::$models !== []) {
36 return self::$models;
37 }
41 $overviewModels = ilBiblOverviewModel::get();
42 $overviewModelsArray = [];
43 foreach ($overviewModels as $model) {
44 if ($model->getLiteratureType()) {
45 $overviewModelsArray[$model->getFileTypeId()][$model->getLiteratureType()] = $model->getPattern();
46 } else {
47 $overviewModelsArray[$model->getFileTypeId()] = $model->getPattern();
48 }
49 }
50 self::$models = $overviewModelsArray;
51
52 return $overviewModelsArray;
53 }
54
55
59 public function getAllOverviewModelsByType(ilBiblTypeInterface $type): array
60 {
61 $models = $this->getAllOverviewModels();
62
63 $id = $type->getId();
64
65 return $models[$id];
66 }
67}
$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...