19declare(strict_types=1);
49 $this->definition =
$DIC[
'objDefinition'];
55 if (!isset(self::$instance)) {
56 self::$instance =
new self();
71 if (!$assigned_template) {
81 foreach ($this->
settings->getTemplates() as $template) {
82 if ($template->getId() === $template_id) {
83 return $template->getIconHandler()->getAbsolutePath();
92 foreach ($this->assignments as $tpl_id =>
$assignments) {
121 return in_array($type, $this->icon_types,
true);
127 $this->icon_types = [];
130 foreach ($this->
settings->getTemplates() as $tpl) {
131 if ($tpl->getIconIdentifier() !==
'') {
132 $templates[] = $tpl->getId();
133 foreach ($tpl->getAssignments() as $assignment) {
134 if (!in_array($assignment, $this->icon_types,
true)) {
135 $this->icon_types[] = $assignment;
Indicates general problems with the input or output operations.
The IllegalStateException indicates a wrong state of the object.
Icon factory for didactic template custom icons.
findAssignedTemplate(int $ref_id)
static ilDidacticTemplateIconFactory $instance
getIconPathForReference(int $ref_id)
getIconPathForTemplate(int $template_id)
supportsCustomIcon(string $type)
ilObjectDefinition $definition
getIconPathForObject(int $obj_id)
Get icon path for object Not applicable to non container objects, use getIconPathForReference instead...
ilDidacticTemplateSettings $settings
static getAssignmentsForTemplates(array $template_ids)
parses the objects.xml it handles the xml-description of all ilias objects
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
The filesystem interface provides the public interface for the Filesystem service API consumer.