ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilClassificationProvider.php
Go to the documentation of this file.
1<?php
2
19use Psr\Http\Message\RequestInterface;
20
26{
27 protected int $parent_ref_id;
28 protected int $parent_obj_id;
29 protected string $parent_type;
30 protected RequestInterface $request;
31
32 public function __construct(
33 int $a_parent_ref_id,
34 int $a_parent_obj_id,
35 string $a_parent_obj_type
36 ) {
37 global $DIC;
38
39 $this->request = $DIC->http()->request();
40 $this->parent_ref_id = $a_parent_ref_id;
41 $this->parent_obj_id = $a_parent_obj_id;
42 $this->parent_type = $a_parent_obj_type;
43
44 $this->init();
45 }
46
47 protected function init(): void
48 {
49 }
50
54 public static function getValidProviders(
55 int $a_parent_ref_id,
56 int $a_parent_obj_id,
57 string $a_parent_obj_type
58 ): array {
59 $res = array();
60
61 if (ilTaxonomyClassificationProvider::isActive($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type)) {
62 $res[] = new ilTaxonomyClassificationProvider($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type);
63 }
64
65 if (ilTaggingClassificationProvider::isActive($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type)) {
66 $res[] = new ilTaggingClassificationProvider($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type);
67 }
68
69 return $res;
70 }
71
75 abstract public static function isActive(
76 int $a_parent_ref_id,
77 int $a_parent_obj_id,
78 string $a_parent_obj_type
79 ): bool;
80
84 abstract public function render(array &$a_html, object $a_parent_gui): void;
85
90 abstract public function importPostData(?array $a_saved = null): array;
91
95 abstract public function setSelection(array $a_value): void;
96
100 abstract public function getFilteredObjects(): array;
101
105 public function initListGUI(ilObjectListGUI $a_list_gui): void
106 {
107 }
108}
setSelection(array $a_value)
Set selection.
render(array &$a_html, object $a_parent_gui)
Render HTML chunks.
static isActive(int $a_parent_ref_id, int $a_parent_obj_id, string $a_parent_obj_type)
Is provider currently active?
importPostData(?array $a_saved=null)
Import post data.
static getValidProviders(int $a_parent_ref_id, int $a_parent_obj_id, string $a_parent_obj_type)
Get all valid providers (for parent container)
__construct(int $a_parent_ref_id, int $a_parent_obj_id, string $a_parent_obj_type)
getFilteredObjects()
Get filtered object ref ids.
initListGUI(ilObjectListGUI $a_list_gui)
Init list gui properties.
static isActive(int $a_parent_ref_id, int $a_parent_obj_id, string $a_parent_obj_type)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isActive(int $a_parent_ref_id, int $a_parent_obj_id, string $a_parent_obj_type)
Is provider currently active?
$res
Definition: ltiservices.php:69
global $DIC
Definition: shib_login.php:26