19declare(strict_types=1);
27use ILIAS\Repository\RetrievalBase;
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) {
119 ?
Order $order =
null,
121 array $parameters = []
128 foreach (
$data as $row) {
133 public function count(array $filter, array $parameters):
int
135 return count($this->data);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Both the subject and the direction need to be specified when expressing an order.
A simple class to express a naive range of whole positive numbers.
count(array $filter, array $parameters)
__construct(protected InternalDomainService $domain, protected int $user_id, protected array $objects, protected string $selected_type)
setData(array $objects, string $selected_type)
getData(array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
isFieldNumeric(string $field)
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID