19 declare(strict_types=1);
38 protected array $objects,
39 protected string $selected_type
41 $this->
setData($this->objects, $this->selected_type);
44 public function setData(array $objects,
string $selected_type): void
46 $access = $this->domain->access();
47 $tree = $this->domain->repositoryTree();
51 if (!$this->user_id) {
56 if (empty($objects[$selected_type])) {
60 foreach ($objects[$selected_type] as
$id => $item) {
64 if (!$tree->isDeleted($ref_id)) {
66 $readable = $access->checkAccessOfUser(
74 $readable = $is_admin;
84 'readable' => $readable
94 return in_array($field, [
'id',
'obj_id',
'ref_id']);
100 $tree = $this->domain->repositoryTree();
103 $path_full = $tree->getPathFull($ref_id);
104 foreach ($path_full as $data) {
105 if (++$counter < (
count($path_full) - 2)) {
108 if ($ref_id != $data[
'ref_id']) {
109 $path .=
' » ' . $data[
'title'];
121 array $parameters = []
125 $data = $this->applyOrder($data, $order);
126 $data = $this->applyRange($data,
$range);
128 foreach ($data as $row) {
133 public function count(array $filter, array $parameters):
int 135 return count($this->data);
getData(array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
setData(array $objects, string $selected_type)
static _getAllReferences(int $id)
get all reference ids for object ID
count(array $filter, array $parameters)
__construct(protected InternalDomainService $domain, protected int $user_id, protected array $objects, protected string $selected_type)
Both the subject and the direction need to be specified when expressing an order. ...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
isFieldNumeric(string $field)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static _lookupType(int $id, bool $reference=false)
A simple class to express a naive range of whole positive numbers.