ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDclTableViewBaseDefaultValue.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
26 public static function findSingle(
27 int $data_type_id,
28 int $tview_id
29 ): ?ActiveRecord { //?|ActiveRecord|ilDclTableViewBaseDefaultValue
30 $storage_location = ilDclCache::getDatatype($data_type_id)->getStorageLocation();
31 if ($storage_location == 0) {
32 return null;
33 }
34
35 try {
38 return $class::getCollection()->where(["tview_set_id" => $tview_id])->first();
39 } catch (Exception) {
40 return null;
41 }
42 }
43
44 public static function findAll(int $data_type_id, int $tview_id): ?array
45 {
46 $storage_location = ilDclCache::getDatatype($data_type_id)->getStorageLocation();
47 if ($storage_location == 0) {
48 return null;
49 }
50
51 try {
53
54 return (new $class())::getCollection()->where(["tview_set_id" => $tview_id])->get();
55 } catch (Exception) {
56 return null;
57 }
58 }
59}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getDatatype(int $datatyp_id)
Get cached datatypes.
static findAll(int $data_type_id, int $tview_id)