ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
Class ilStudyProgrammeType. More...
Public Member Functions | |
__construct (int $id, ilStudyProgrammeTypeRepository $type_repo, ILIAS\Filesystem\Filesystem $webdir, ilPluginAdmin $plugin_admin, ilLanguage $lng, ilObjUser $user) | |
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 ($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 | WEB_DATA_FOLDER = 'prg_data' |
Folder in ILIAS webdir to store the icons. More... | |
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... | |
Protected Attributes | |
$id = 0 | |
$default_lang = '' | |
$owner | |
$create_date | |
$last_update | |
$icon | |
$amd_records_assigned | |
$log | |
$user | |
$plugin_admin | |
$active_plugins | |
$lng | |
$translations | |
$changed_translations = array() | |
Static Protected Attributes | |
static | $amd_records_available |
Class ilStudyProgrammeType.
Definition at line 9 of file class.ilStudyProgrammeType.php.
ilStudyProgrammeType::__construct | ( | int | $id, |
ilStudyProgrammeTypeRepository | $type_repo, | ||
ILIAS\Filesystem\Filesystem | $webdir, | ||
ilPluginAdmin | $plugin_admin, | ||
ilLanguage | $lng, | ||
ilObjUser | $user | ||
) |
int | $a_id |
ilStudyProgrammeTypeException |
Definition at line 100 of file class.ilStudyProgrammeType.php.
References $id, $lng, $plugin_admin, $user, and user().
ilStudyProgrammeType::changedTranslations | ( | ) |
Definition at line 629 of file class.ilStudyProgrammeType.php.
References $changed_translations.
ilStudyProgrammeType::getCreateDate | ( | ) |
Definition at line 604 of file class.ilStudyProgrammeType.php.
References $create_date.
Referenced by ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getDefaultLang | ( | ) |
Definition at line 586 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.
string | $a_lang_code |
Definition at line 154 of file class.ilStudyProgrammeType.php.
References getTranslation().
Referenced by ilStudyProgrammeTypeGUI\buildLanguagesForms().
ilStudyProgrammeType::getIcon | ( | ) |
Definition at line 548 of file class.ilStudyProgrammeType.php.
References $icon.
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm(), getIconPath(), processAndStoreIconFile(), 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 561 of file class.ilStudyProgrammeType.php.
References getIcon(), and getId().
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm(), processAndStoreIconFile(), removeIconFile(), and ilStudyProgrammeTypeDBRepository\updateRowTypeTranslationDB().
ilStudyProgrammeType::getId | ( | ) |
Definition at line 518 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 509 of file class.ilStudyProgrammeType.php.
References $last_update.
Referenced by ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getOwner | ( | ) |
Definition at line 491 of file class.ilStudyProgrammeType.php.
References $owner.
Referenced by ilStudyProgrammeTypeDBRepository\updateType().
ilStudyProgrammeType::getRepository | ( | ) |
Definition at line 609 of file class.ilStudyProgrammeType.php.
References $active_plugins, XapiProxy\$plugin, and IL_COMP_MODULE.
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.
string | $a_lang_code |
Definition at line 125 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
$a_member | |
$a_lang_code |
Definition at line 345 of file class.ilStudyProgrammeType.php.
References $lang, getDefaultLang(), loadTranslation(), and user().
Referenced by getDescription(), getTitle(), and setTranslations().
ilStudyProgrammeType::getTranslations | ( | ) |
|
protected |
Definition at line 373 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 289 of file class.ilStudyProgrammeType.php.
References $filename, getIcon(), getIconPath(), ILIAS\Filesystem\Stream\Streams\ofResource(), and updateable().
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm().
ilStudyProgrammeType::removeIconFile | ( | ) |
Remove the icon file on disk.
Definition at line 317 of file class.ilStudyProgrammeType.php.
References getIcon(), getIconPath(), setIcon(), and updateable().
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm().
ilStudyProgrammeType::setCreateDate | ( | DateTime | $create_date | ) |
string | $create_date |
Definition at line 595 of file class.ilStudyProgrammeType.php.
References $create_date.
ilStudyProgrammeType::setDefaultLang | ( | string | $default_lang | ) |
string | $default_lang |
ilStudyProgrammeTypePluginException |
Definition at line 577 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.
$a_description | ||
string | $a_lang_code |
Definition at line 167 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.
string | $icon |
ilStudyProgrammeTypeException |
Definition at line 536 of file class.ilStudyProgrammeType.php.
References $icon.
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\fillForm(), and removeIconFile().
ilStudyProgrammeType::setLastUpdate | ( | $last_update | ) |
string | $last_update |
Definition at line 500 of file class.ilStudyProgrammeType.php.
References $last_update.
ilStudyProgrammeType::setOwner | ( | int | $owner | ) |
int | $owner |
Definition at line 482 of file class.ilStudyProgrammeType.php.
References $owner.
ilStudyProgrammeType::setTitle | ( | string | $title, |
string | $lang_code = '' |
||
) |
Set title of StudyProgramme type.
If no lang code is given, sets title for default language.
$a_title | ||
string | $a_lang_code |
Definition at line 138 of file class.ilStudyProgrammeType.php.
References $lang, and getDefaultLang().
Referenced by ilStudyProgrammeTypeGUI\update().
ilStudyProgrammeType::setTranslations | ( | array | $translations | ) |
Getters & Setters.
array | $translations |
Definition at line 415 of file class.ilStudyProgrammeType.php.
References XapiProxy\$plugin, $translations, getId(), and getTranslation().
|
protected |
Helper function to check if this type can be updated.
Definition at line 396 of file class.ilStudyProgrammeType.php.
References XapiProxy\$plugin.
Referenced by processAndStoreIconFile(), and removeIconFile().
ilStudyProgrammeType::updateAssignedStudyProgrammesIcons | ( | ) |
Update the Icons of assigned objects.
Definition at line 179 of file class.ilStudyProgrammeType.php.
References $id, XapiProxy\$plugin, ilObject\_getAllReferences(), getId(), ilObjStudyProgramme\getInstanceByRefId(), and ilAdvancedMDRecord\saveObjRecSelection().
Referenced by ilStudyProgrammeTypeCustomIconsFormGUI\saveObject().
|
protected |
Definition at line 79 of file class.ilStudyProgrammeType.php.
Referenced by getRepository().
|
protected |
Definition at line 54 of file class.ilStudyProgrammeType.php.
|
staticprotected |
Definition at line 59 of file class.ilStudyProgrammeType.php.
|
protected |
Definition at line 93 of file class.ilStudyProgrammeType.php.
Referenced by changedTranslations().
|
protected |
Definition at line 39 of file class.ilStudyProgrammeType.php.
Referenced by getCreateDate(), and setCreateDate().
|
protected |
Definition at line 29 of file class.ilStudyProgrammeType.php.
Referenced by getDefaultLang(), and setDefaultLang().
|
protected |
Definition at line 49 of file class.ilStudyProgrammeType.php.
|
protected |
Definition at line 24 of file class.ilStudyProgrammeType.php.
Referenced by __construct(), getId(), and updateAssignedStudyProgrammesIcons().
|
protected |
Definition at line 44 of file class.ilStudyProgrammeType.php.
Referenced by getLastUpdate(), and setLastUpdate().
|
protected |
Definition at line 84 of file class.ilStudyProgrammeType.php.
Referenced by __construct().
|
protected |
Definition at line 64 of file class.ilStudyProgrammeType.php.
|
protected |
Definition at line 34 of file class.ilStudyProgrammeType.php.
Referenced by getOwner(), and setOwner().
|
protected |
Definition at line 74 of file class.ilStudyProgrammeType.php.
Referenced by __construct().
|
protected |
Definition at line 89 of file class.ilStudyProgrammeType.php.
Referenced by getTranslations(), and setTranslations().
|
protected |
Definition at line 69 of file class.ilStudyProgrammeType.php.
Referenced by __construct().
const ilStudyProgrammeType::DATE_FORMAT = 'Y-m-d' |
Definition at line 19 of file class.ilStudyProgrammeType.php.
const ilStudyProgrammeType::DATE_TIME_FORMAT = 'Y-m-d H:i:s' |
Definition at line 18 of file class.ilStudyProgrammeType.php.
Referenced by ilStudyProgrammeTypeDBRepository\createTypeByRow(), and ilStudyProgrammeTypeDBRepository\updateType().
const ilStudyProgrammeType::WEB_DATA_FOLDER = 'prg_data' |
Folder in ILIAS webdir to store the icons.
Definition at line 15 of file class.ilStudyProgrammeType.php.
Referenced by ilStudyProgrammeTypeTest\test_icon_path().