ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 = [];
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 
58  public function getAllOverviewModelsByType(ilBiblTypeInterface $type): array
59  {
60  $models = $this->getAllOverviewModels();
61 
62  $id = $type->getId();
63 
64  return $models[$id];
65  }
66 }
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...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
getAllOverviewModelsByType(ilBiblTypeInterface $type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...