3 declare(strict_types=1);
35 $this->definition = $DIC[
'objDefinition'];
41 if (!isset(self::$instance)) {
42 self::$instance =
new self();
45 return self::$instance;
57 if (!$assigned_template) {
67 foreach ($this->
settings->getTemplates() as $template) {
68 if ($template->getId() === $template_id) {
69 return $template->getIconHandler()->getAbsolutePath();
78 foreach ($this->assignments as $tpl_id => $assignments) {
79 if (in_array($ref_id, $assignments,
true)) {
107 return in_array($type, $this->icon_types,
true);
113 $this->icon_types = [];
117 if (
$tpl->getIconIdentifier() !==
'') {
118 $templates[] =
$tpl->getId();
119 foreach (
$tpl->getAssignments() as $assignment) {
120 if (!in_array($assignment, $this->icon_types,
true)) {
121 $this->icon_types[] = $assignment;
getIconPathForTemplate(int $template_id)
Icon factory for didactic template custom icons.
supportsCustomIcon(string $type)
static _getAllReferences(int $id)
get all reference ids for object ID
getIconPathForObject(int $obj_id)
Get icon path for object Not applicable to non container objects, use getIconPathForReference instead...
static _lookupObjId(int $ref_id)
parses the objects.xml it handles the xml-description of all ilias objects
getIconPathForReference(int $ref_id)
static getAssignmentsForTemplates(array $template_ids)
ilObjectDefinition $definition
ilDidacticTemplateSettings $settings
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
static _lookupType(int $id, bool $reference=false)
findAssignedTemplate(int $ref_id)
static ilDidacticTemplateIconFactory $instance