ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
CourseReferenceObjectPropertiesProviders.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use ILIAS\Object\Properties\ObjectTypeSpecificProperties\ilObjectTypeSpecificPropertyProviders;
25use ILIAS\UI\Component\Image\Factory as ImageFactory;
26use ILIAS\ResourceStorage\Services as StorageService;
27
28class CourseReferenceObjectPropertiesProviders implements ilObjectTypeSpecificPropertyProviders
29{
31 int $obj_id,
32 ImageFactory $factory,
33 StorageService $irss
34 ): ?Image {
35 return null;
36 }
37
38 public function getObjectTypeSpecificIcon(
39 int $obj_id,
40 IconFactory $icon_factory,
41 StorageService $irss
42 ): ?CustomIcon {
43 $category = new ilObjCourse(
44 ilObjCategoryReference::_lookupTargetId($obj_id),
45 false
46 );
47
49 $custom_icon = $category->getObjectProperties()->getPropertyIcon()->getCustomIcon();
50 if ($custom_icon?->exists()) {
51 return $icon_factory->custom(
52 $custom_icon->getFullPath(),
53 ''
54 );
55 }
56
57 return null;
58 }
59}
getObjectTypeSpecificTileImage(int $obj_id, ImageFactory $factory, StorageService $irss)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This is how the factory for UI elements looks.
Definition: Factory.php:28
This describes the behavior of an custom icon.
Definition: Custom.php:27
This is how a factory for icons looks like.
Definition: Factory.php:27