ILIAS  release_8 Revision v8.24
class.ilDclTableViewBaseDefaultValue.php
Go to the documentation of this file.
1<?php
2
20{
24 public static function findSingle(
25 int $data_type_id,
26 int $tview_id
27 ): ?ActiveRecord { //?|ActiveRecord|ilDclTableViewBaseDefaultValue
28 $storage_location = ilDclCache::getDatatype($data_type_id)->getStorageLocation();
29 if (is_null($storage_location) || $storage_location == 0) {
30 return null;
31 }
32
33 try {
36 return $class::getCollection()->where(array("tview_set_id" => $tview_id))->first();
37 } catch (Exception $ex) {
38 return null;
39 }
40 }
41
42 public static function findAll(int $data_type_id, int $tview_id): ?array
43 {
44 $storage_location = ilDclCache::getDatatype($data_type_id)->getStorageLocation();
45 if (is_null($storage_location) || $storage_location == 0) {
46 return null;
47 }
48
49 try {
51 return $class::getCollection()->where(array("tview_set_id" => $tview_id))->get();
52 } catch (Exception $ex) {
53 return null;
54 }
55 }
56}
Class ActiveRecord.
static getDatatype(int $datatyp_id)
Get cached datatypes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static findAll(int $data_type_id, int $tview_id)