ILIAS
release_8 Revision v8.19-1-g4e8f2f9140c
|
Class ilStudyProgrammeType. More...
Public Member Functions | |
__construct (int $id, ilStudyProgrammeTypeRepository $type_repo, ILIAS\Filesystem\Filesystem $webdir, ilLanguage $lng, ilObjUser $user, ilComponentFactory $component_factory) | |
getTitle (string $a_lang_code='') | |
Get the title of an StudyProgramme type. More... | |
setTitle (string $title, string $lang_code='') | |
Set title of StudyProgramme type. More... | |
getDescription (string $lang_code='') | |
Get the description of an StudyProgramme type. More... | |
setDescription (string $description, string $lang_code='') | |
Set description of StudyProgramme type. More... | |
updateAssignedStudyProgrammesIcons () | |
Update the Icons of assigned objects. More... | |
processAndStoreIconFile (array $file_data) | |
Resize and store an icon file for this object. More... | |
removeIconFile () | |
Remove the icon file on disk. More... | |
setTranslations (array $translations) | |
Getters & Setters. More... | |
getTranslations () | |
setOwner (int $owner) | |
getOwner () | |
setLastUpdate (DateTime $last_update) | |
getLastUpdate () | |
getId () | |
setIcon (string $icon) | |
Set new Icon filename. More... | |
getIcon () | |
getIconPath (bool $append_filename=false) | |
Return the path to the icon. More... | |
setDefaultLang (string $default_lang) | |
getDefaultLang () | |
setCreateDate (DateTime $create_date) | |
getCreateDate () | |
getRepository () | |
changedTranslations () | |
Data Fields | |
const | DATE_TIME_FORMAT = 'Y-m-d H:i:s' |
const | DATE_FORMAT = 'Y-m-d' |
Protected Member Functions | |
getTranslation (string $member, string $lang_code) | |
Protected. More... | |
loadTranslation (string $lang_code) | |
updateable () | |
Helper function to check if this type can be updated. More... | |
getActivePlugins () | |
Protected Attributes | |
string | $default_lang = '' |
int | $owner |
DateTime | $create_date |
DateTime | $last_update |
string | $icon |
ilObjUser | $user |
array | $active_plugins |
ilLanguage | $lng |
array | $translations |
array | $changed_translations = array() |
int | $id = 0 |
ilStudyProgrammeTypeRepository | $type_repo |
Filesystem | $webdir |
ilComponentFactory | $component_factory |
Private Attributes | |
const | WEB_DATA_FOLDER = 'prg_data' |
Folder in ILIAS webdir to store the icons. More... | |
Class ilStudyProgrammeType.
Definition at line 29 of file class.ilStudyProgrammeType.php.
ilStudyProgrammeType::__construct | ( | int | $id, |
ilStudyProgrammeTypeRepository | $type_repo, | ||
ILIAS\Filesystem\Filesystem | $webdir, | ||
ilLanguage | $lng, | ||
ilObjUser | $user, | ||
ilComponentFactory | $component_factory | ||
) |
Definition at line 57 of file class.ilStudyProgrammeType.php.
References $component_factory, $id, $lng, $type_repo, $user, $webdir, ILIAS\Repository\lng(), and ILIAS\Repository\user().
ilStudyProgrammeType::changedTranslations | ( | ) |
Definition at line 484 of file class.ilStudyProgrammeType.php.
References $changed_translations.
|
protected |
Definition at line 479 of file class.ilStudyProgrammeType.php.
Referenced by setTranslations(), updateable(), and updateAssignedStudyProgrammesIcons().
ilStudyProgrammeType::getCreateDate | ( | ) |
Definition at line 469 of file class.ilStudyProgrammeType.php.
References $create_date.
Referenced by ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getDefaultLang | ( | ) |
Definition at line 459 of file class.ilStudyProgrammeType.php.
References $default_lang.
Referenced by ilStudyProgrammeTypeGUI\buildForm(), getTranslation(), setDescription(), setTitle(), and ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getDescription | ( | string | $lang_code = '' | ) |
Get the description of an StudyProgramme type.
If no language code is given, a translation in the user-language is returned. If no such translation exists, the description of the default language is substituted. If a language code is provided, returns description for the given language or null.
Definition at line 98 of file class.ilStudyProgrammeType.php.
References getTranslation().
Referenced by ilStudyProgrammeTypeGUI\buildLanguagesForms().
ilStudyProgrammeType::getIcon | ( | ) |
Definition at line 434 of file class.ilStudyProgrammeType.php.
References $icon.
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm(), getIconPath(), removeIconFile(), and ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getIconPath | ( | bool | $append_filename = false | ) |
Return the path to the icon.
bool | $append_filename | If true, append filename of icon |
Definition at line 444 of file class.ilStudyProgrammeType.php.
References $path, getIcon(), and getId().
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm(), processAndStoreIconFile(), removeIconFile(), and ilStudyProgrammeTypeDBRepository\updateRowTypeTranslationDB().
ilStudyProgrammeType::getId | ( | ) |
Definition at line 411 of file class.ilStudyProgrammeType.php.
References $id.
Referenced by ilStudyProgrammeTypeAdvancedMetaDataFormGUI\fillForm(), ilStudyProgrammeTypeAdvancedMetaDataFormGUI\fillObject(), getIconPath(), loadTranslation(), setTranslations(), updateAssignedStudyProgrammesIcons(), ilStudyProgrammeTypeDBRepository\updateRowTypeTranslationDB(), and ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getLastUpdate | ( | ) |
Definition at line 406 of file class.ilStudyProgrammeType.php.
References $last_update.
Referenced by ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getOwner | ( | ) |
Definition at line 396 of file class.ilStudyProgrammeType.php.
References $owner.
Referenced by ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getRepository | ( | ) |
Definition at line 474 of file class.ilStudyProgrammeType.php.
References $type_repo.
ilStudyProgrammeType::getTitle | ( | string | $a_lang_code = '' | ) |
Get the title of an StudyProgramme type.
If no language code is given, a translation in the user-language is returned. If no such translation exists, the translation of the default language is substituted. If a language code is provided, returns title for the given language or null.
Definition at line 78 of file class.ilStudyProgrammeType.php.
References getTranslation().
Referenced by ilStudyProgrammeTypeGUI\buildLanguagesForms().
|
protected |
Protected.
Helper method to return a translation for a given member and language
Definition at line 266 of file class.ilStudyProgrammeType.php.
References $lang, getDefaultLang(), loadTranslation(), and ILIAS\Repository\user().
Referenced by getDescription(), getTitle(), and setTranslations().
ilStudyProgrammeType::getTranslations | ( | ) |
|
protected |
Definition at line 294 of file class.ilStudyProgrammeType.php.
References getId().
Referenced by getTranslation().
ilStudyProgrammeType::processAndStoreIconFile | ( | array | $file_data | ) |
Resize and store an icon file for this object.
array | $file_data | The array containing file information from the icon from PHPs $_FILES array |
Definition at line 219 of file class.ilStudyProgrammeType.php.
References getIconPath(), ILIAS\Filesystem\Stream\Streams\ofResource(), and updateable().
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm().
ilStudyProgrammeType::removeIconFile | ( | ) |
Remove the icon file on disk.
Definition at line 244 of file class.ilStudyProgrammeType.php.
References getIcon(), getIconPath(), setIcon(), and updateable().
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm().
ilStudyProgrammeType::setCreateDate | ( | DateTime | $create_date | ) |
ilStudyProgrammeType::setDefaultLang | ( | string | $default_lang | ) |
Definition at line 454 of file class.ilStudyProgrammeType.php.
References $default_lang.
Referenced by ilStudyProgrammeTypeGUI\update().
ilStudyProgrammeType::setDescription | ( | string | $description, |
string | $lang_code = '' |
||
) |
Set description of StudyProgramme type.
If no lang code is given, sets description for default language.
Definition at line 107 of file class.ilStudyProgrammeType.php.
References $lang, and getDefaultLang().
Referenced by ilStudyProgrammeTypeGUI\update().
ilStudyProgrammeType::setIcon | ( | string | $icon | ) |
Set new Icon filename.
Note that if you did also send a new icon image file with a form, make sure to call ilStudyProgrammeType::processAndStoreIconFile() to store the file additionally on disk.
If you want to delete the icon, set call ilStudyProgrammeType::removeIconFile() first and set an empty string here.
ilStudyProgrammeTypeException |
Definition at line 426 of file class.ilStudyProgrammeType.php.
References $icon.
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm(), and removeIconFile().
ilStudyProgrammeType::setLastUpdate | ( | DateTime | $last_update | ) |
ilStudyProgrammeType::setOwner | ( | int | $owner | ) |
ilStudyProgrammeType::setTitle | ( | string | $title, |
string | $lang_code = '' |
||
) |
Set title of StudyProgramme type.
If no lang code is given, sets title for default language.
Definition at line 87 of file class.ilStudyProgrammeType.php.
References $lang, and getDefaultLang().
Referenced by ilStudyProgrammeTypeGUI\update().
ilStudyProgrammeType::setTranslations | ( | array | $translations | ) |
Getters & Setters.
Definition at line 330 of file class.ilStudyProgrammeType.php.
References XapiProxy\$plugin, $translations, getActivePlugins(), getId(), getTranslation(), and ILIAS\Repository\lng().
|
protected |
Helper function to check if this type can be updated.
Definition at line 315 of file class.ilStudyProgrammeType.php.
References XapiProxy\$plugin, and getActivePlugins().
Referenced by processAndStoreIconFile(), and removeIconFile().
ilStudyProgrammeType::updateAssignedStudyProgrammesIcons | ( | ) |
Update the Icons of assigned objects.
Definition at line 116 of file class.ilStudyProgrammeType.php.
References ILIAS\LTI\ToolProvider\$key, XapiProxy\$plugin, $ref_id, ilObject\_getAllReferences(), getActivePlugins(), getId(), ilObjStudyProgramme\getInstanceByRefId(), ILIAS\Repository\lng(), and ilAdvancedMDRecord\saveObjRecSelection().
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\saveObject().
|
protected |
Definition at line 45 of file class.ilStudyProgrammeType.php.
|
protected |
Definition at line 48 of file class.ilStudyProgrammeType.php.
Referenced by changedTranslations().
|
protected |
Definition at line 54 of file class.ilStudyProgrammeType.php.
Referenced by __construct().
|
protected |
Definition at line 41 of file class.ilStudyProgrammeType.php.
Referenced by getCreateDate(), and setCreateDate().
|
protected |
Definition at line 39 of file class.ilStudyProgrammeType.php.
Referenced by getDefaultLang(), and setDefaultLang().
|
protected |
Definition at line 43 of file class.ilStudyProgrammeType.php.
|
protected |
Definition at line 50 of file class.ilStudyProgrammeType.php.
Referenced by __construct(), and getId().
|
protected |
Definition at line 42 of file class.ilStudyProgrammeType.php.
Referenced by getLastUpdate(), and setLastUpdate().
|
protected |
Definition at line 46 of file class.ilStudyProgrammeType.php.
Referenced by __construct().
|
protected |
Definition at line 40 of file class.ilStudyProgrammeType.php.
Referenced by getOwner(), and setOwner().
|
protected |
Definition at line 47 of file class.ilStudyProgrammeType.php.
Referenced by getTranslations(), and setTranslations().
|
protected |
Definition at line 51 of file class.ilStudyProgrammeType.php.
Referenced by __construct(), and getRepository().
|
protected |
Definition at line 44 of file class.ilStudyProgrammeType.php.
Referenced by __construct().
|
protected |
Definition at line 52 of file class.ilStudyProgrammeType.php.
Referenced by __construct().
const ilStudyProgrammeType::DATE_FORMAT = 'Y-m-d' |
Definition at line 37 of file class.ilStudyProgrammeType.php.
const ilStudyProgrammeType::DATE_TIME_FORMAT = 'Y-m-d H:i:s' |
Definition at line 36 of file class.ilStudyProgrammeType.php.
Referenced by ilStudyProgrammeTypeDBRepository\createTypeByRow(), and ilStudyProgrammeTypeDBRepository\updateType().
|
private |
Folder in ILIAS webdir to store the icons.
Definition at line 34 of file class.ilStudyProgrammeType.php.