ILIAS  release_8 Revision v8.24
ilObjectCustomIconFactory Class Reference
+ Collaboration diagram for ilObjectCustomIconFactory:

Public Member Functions

 __construct (Filesystem $webDirectory, FileUpload $uploadService, ilObjectDataCache $objectCache)
 
 getConfigurationByType (string $type)
 
 getByObjId (int $objId, string $objType='')
 
 getPresenterByObjId (int $objId, string $objType)
 

Protected Attributes

Filesystem $webDirectory
 
FileUpload $uploadService
 
ilObjectDataCache $objectCache
 

Detailed Description

Definition at line 24 of file class.ilObjectCustomIconFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjectCustomIconFactory::__construct ( Filesystem  $webDirectory,
FileUpload  $uploadService,
ilObjectDataCache  $objectCache 
)

Definition at line 30 of file class.ilObjectCustomIconFactory.php.

34 {
35 $this->webDirectory = $webDirectory;
36 $this->uploadService = $uploadService;
37 $this->objectCache = $objectCache;
38 }

References $objectCache, $uploadService, and $webDirectory.

Member Function Documentation

◆ getByObjId()

ilObjectCustomIconFactory::getByObjId ( int  $objId,
string  $objType = '' 
)

Definition at line 60 of file class.ilObjectCustomIconFactory.php.

61 {
62 if ($objType === '') {
63 $objType = $this->objectCache->lookupType($objId);
64 }
65
66 return new ilObjectCustomIconImpl(
67 $this->webDirectory,
68 $this->uploadService,
69 $this->getConfigurationByType($objType),
70 $objId
71 );
72 }
Class ilObjectCustomIconImpl TODO: Inject database persistence in future instead of using \ilContaine...
$objId
Definition: xapitoken.php:57

References $objId, and getConfigurationByType().

Referenced by getPresenterByObjId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getConfigurationByType()

ilObjectCustomIconFactory::getConfigurationByType ( string  $type)

Definition at line 40 of file class.ilObjectCustomIconFactory.php.

41 {
42 switch ($type) {
43 case 'grp':
44 case 'root':
45 case 'cat':
46 case 'fold':
47 case 'crs':
48 case 'prg':
49 $configuration = new ilContainerCustomIconConfiguration();
50 break;
51
52 default:
53 $configuration = new ilObjectCustomIconConfiguration();
54 break;
55 }
56
57 return $configuration;
58 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$type

References $type.

Referenced by getByObjId().

+ Here is the caller graph for this function:

◆ getPresenterByObjId()

ilObjectCustomIconFactory::getPresenterByObjId ( int  $objId,
string  $objType 
)

Definition at line 74 of file class.ilObjectCustomIconFactory.php.

75 {
76 if ($objType === '') {
77 $objType = $this->objectCache->lookupType($objId);
78 }
79
80 switch ($objType) {
81 case 'catr':
82 case 'grpr':
83 case 'crsr':
84 $presenter = new ilObjectReferenceCustomIconPresenter($objId, $this);
85 $presenter->init();
86 break;
87
88 default:
89 $presenter = new ilObjectCustomIconPresenterImpl($this->getByObjId($objId, $objType));
90 break;
91
92 }
93
94 return $presenter;
95 }
getByObjId(int $objId, string $objType='')
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $objId, and getByObjId().

+ Here is the call graph for this function:

Field Documentation

◆ $objectCache

ilObjectDataCache ilObjectCustomIconFactory::$objectCache
protected

Definition at line 28 of file class.ilObjectCustomIconFactory.php.

Referenced by __construct().

◆ $uploadService

FileUpload ilObjectCustomIconFactory::$uploadService
protected

Definition at line 27 of file class.ilObjectCustomIconFactory.php.

Referenced by __construct().

◆ $webDirectory

Filesystem ilObjectCustomIconFactory::$webDirectory
protected

Definition at line 26 of file class.ilObjectCustomIconFactory.php.

Referenced by __construct().


The documentation for this class was generated from the following file: