ILIAS  release_8 Revision v8.24
class.ilClassificationProvider.php
Go to the documentation of this file.
1<?php
2
16use Psr\Http\Message\RequestInterface;
17
23{
24 protected int $parent_ref_id;
25 protected int $parent_obj_id;
26 protected string $parent_type;
27 protected RequestInterface $request;
28
29 public function __construct(
30 int $a_parent_ref_id,
31 int $a_parent_obj_id,
32 string $a_parent_obj_type
33 ) {
34 global $DIC;
35
36 $this->request = $DIC->http()->request();
37 $this->parent_ref_id = $a_parent_ref_id;
38 $this->parent_obj_id = $a_parent_obj_id;
39 $this->parent_type = $a_parent_obj_type;
40
41 $this->init();
42 }
43
44 protected function init(): void
45 {
46 }
47
51 public static function getValidProviders(
52 int $a_parent_ref_id,
53 int $a_parent_obj_id,
54 string $a_parent_obj_type
55 ): array {
56 $res = array();
57
58 if (ilTaxonomyClassificationProvider::isActive($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type)) {
59 $res[] = new ilTaxonomyClassificationProvider($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type);
60 }
61
62 if (ilTaggingClassificationProvider::isActive($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type)) {
63 $res[] = new ilTaggingClassificationProvider($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type);
64 }
65
66 return $res;
67 }
68
72 abstract public static function isActive(
73 int $a_parent_ref_id,
74 int $a_parent_obj_id,
75 string $a_parent_obj_type
76 ): bool;
77
81 abstract public function render(array &$a_html, object $a_parent_gui): void;
82
87 abstract public function importPostData(?array $a_saved = null): array;
88
92 abstract public function setSelection(array $a_value): void;
93
97 abstract public function getFilteredObjects(): array;
98
102 public function initListGUI(ilObjectListGUI $a_list_gui): void
103 {
104 }
105}
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?
global $DIC
Definition: feed.php:28
$res
Definition: ltiservices.php:69