ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilOrgUnitType. More...
Public Member Functions | |
__construct ($a_id=0) | |
save () | |
Wrapper around create() and update() methods. More... | |
getTitle ($a_lang_code='') | |
Get the title of an OrgUnit type. More... | |
setTitle ($a_title, $a_lang_code='') | |
Set title of OrgUnit type. More... | |
getDescription ($a_lang_code='') | |
Get the description of an OrgUnit type. More... | |
setDescription ($a_description, $a_lang_code='') | |
Set description of OrgUnit type. More... | |
getOrgUnitIds ($include_deleted=true) | |
Get an array of IDs of ilObjOrgUnit objects using this type. More... | |
getOrgUnits ($include_deleted=true) | |
Get an array of ilObjOrgUnit objects using this type. More... | |
getAssignedAdvancedMDRecords ($a_only_active=false) | |
Get assigned AdvancedMDRecord 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 ($translations) | |
Getters & Setters. More... | |
getTranslations () | |
Returns the loaded translation objects. More... | |
setOwner ($owner) | |
getOwner () | |
setLastUpdate ($last_update) | |
getLastUpdate () | |
getId () | |
setIcon ($icon) | |
Set new Icon filename. More... | |
getIcon () | |
getIconPath ($append_filename=false) | |
Return the path to the icon. More... | |
getDefaultLang () | |
setCreateDate ($create_date) | |
getCreateDate () | |
Static Public Member Functions | |
static | getInstance ($a_id) |
Public. More... | |
static | getAllTypes () |
Get array of all instances of ilOrgUnitType objects. More... | |
static | getAvailableAdvancedMDRecords () |
Get all available AdvancedMDRecord objects for OrgUnits/Types. More... | |
Data Fields | |
const | TABLE_NAME = 'orgu_types' |
const | WEB_DATA_FOLDER = 'orgu_data' |
Folder in ILIAS webdir to store the icons. More... | |
Protected Member Functions | |
getTranslation ($a_member, $a_lang_code) | |
Protected. More... | |
loadTranslation ($a_lang_code) | |
Helper function to load a translation. More... | |
read () | |
Read object data from database. More... | |
updateable () | |
Helper function to check if this type can be updated. More... | |
Protected Attributes | |
$id = 0 | |
$default_lang = '' | |
$owner | |
$create_date | |
$last_update | |
$icon | |
$translations = array() | |
$amd_records_assigned | |
$orgus | |
$orgus_ids | |
$db | |
$log | |
$user | |
$pluginAdmin | |
$active_plugins | |
$lng | |
Static Protected Attributes | |
static | $amd_records_available |
static | $instances = array() |
Class ilOrgUnitType.
Definition at line 9 of file class.ilOrgUnitType.php.
ilOrgUnitType::__construct | ( | $a_id = 0 | ) |
int | $a_id |
ilOrgUnitTypeException |
Definition at line 97 of file class.ilOrgUnitType.php.
References $DIC, $ilDB, $ilLog, $ilUser, $lng, read(), and user().
|
static |
Get array of all instances of ilOrgUnitType objects.
Definition at line 153 of file class.ilOrgUnitType.php.
References $default_lang, $DIC, $ilDB, $lang, $title, $type, getDefaultLang(), getIcon(), getId(), getOwner(), getTranslation(), League\Flysystem\Adapter\Polyfill\update(), and user().
Referenced by ilOrgUnitTypeTableGUI\initColumns(), and ilObjOrgUnitSettingsFormGUI\saveObject().
ilOrgUnitType::getAssignedAdvancedMDRecords | ( | $a_only_active = false | ) |
Get assigned AdvancedMDRecord objects.
bool | $a_only_active | True if only active AMDRecords are returned |
Definition at line 448 of file class.ilOrgUnitType.php.
References getId().
|
static |
Get all available AdvancedMDRecord objects for OrgUnits/Types.
Definition at line 496 of file class.ilOrgUnitType.php.
References $key, ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), getId(), getOrgUnitIds(), and ilAdvancedMDRecord\saveObjRecSelection().
Referenced by ilOrgUnitTypeAdvancedMetaDataFormGUI\saveObject().
ilOrgUnitType::getCreateDate | ( | ) |
ilOrgUnitType::getDefaultLang | ( | ) |
Definition at line 1002 of file class.ilOrgUnitType.php.
References $default_lang.
Referenced by getAllTypes(), getTranslation(), setDescription(), and setTitle().
ilOrgUnitType::getDescription | ( | $a_lang_code = '' | ) |
Get the description of an OrgUnit 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 358 of file class.ilOrgUnitType.php.
References getTranslation().
ilOrgUnitType::getIcon | ( | ) |
Definition at line 944 of file class.ilOrgUnitType.php.
References $icon.
Referenced by getAllTypes(), getIconPath(), and processAndStoreIconFile().
ilOrgUnitType::getIconPath | ( | $append_filename = false | ) |
Return the path to the icon.
bool | $append_filename | If true, append filename of icon |
Definition at line 957 of file class.ilOrgUnitType.php.
References $default_lang, $path, getIcon(), getId(), and ilUtil\getWebspaceDir().
Referenced by processAndStoreIconFile(), removeIconFile(), and save().
ilOrgUnitType::getId | ( | ) |
Definition at line 914 of file class.ilOrgUnitType.php.
References $id.
Referenced by getAllTypes(), getAssignedAdvancedMDRecords(), getAvailableAdvancedMDRecords(), getIconPath(), getOrgUnitIds(), getTranslation(), getTranslations(), loadTranslation(), and save().
|
static |
Public.
Get instance of an ilOrgUnitType object Returns object from cache or from database, returns null if no object was found
int | $a_id | ID of the OrgUnit type |
Definition at line 128 of file class.ilOrgUnitType.php.
References $type.
Referenced by ilObjOrgUnit\getOrgUnitType(), and ilObjOrgUnit\setOrgUnitTypeId().
ilOrgUnitType::getLastUpdate | ( | ) |
ilOrgUnitType::getOrgUnitIds | ( | $include_deleted = true | ) |
Get an array of IDs of ilObjOrgUnit objects using this type.
bool | $include_deleted |
Definition at line 385 of file class.ilOrgUnitType.php.
References getId().
Referenced by getAvailableAdvancedMDRecords(), and getOrgUnits().
ilOrgUnitType::getOrgUnits | ( | $include_deleted = true | ) |
Get an array of ilObjOrgUnit objects using this type.
bool | $include_deleted | True if also deleted OrgUnits are returned |
Definition at line 415 of file class.ilOrgUnitType.php.
References $id, ilObject\_getAllReferences(), ilObject\_isInTrash(), and getOrgUnitIds().
Referenced by save().
ilOrgUnitType::getOwner | ( | ) |
Definition at line 887 of file class.ilOrgUnitType.php.
References $owner.
Referenced by getAllTypes().
ilOrgUnitType::getTitle | ( | $a_lang_code = '' | ) |
Get the title of an OrgUnit 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 329 of file class.ilOrgUnitType.php.
References getTranslation().
|
protected |
Protected.
Helper method to return a translation for a given member and language
$a_member | |
$a_lang_code |
Definition at line 660 of file class.ilOrgUnitType.php.
References $active_plugins, $lang, getDefaultLang(), getId(), IL_COMP_MODULE, loadTranslation(), and user().
Referenced by getAllTypes(), getDescription(), and getTitle().
ilOrgUnitType::getTranslations | ( | ) |
Returns the loaded translation objects.
Definition at line 852 of file class.ilOrgUnitType.php.
References $translations, and getId().
|
protected |
Helper function to load a translation.
Returns translation object from cache or null, if no translation exists for the given code.
string | $a_lang_code | A language code |
Definition at line 779 of file class.ilOrgUnitType.php.
References getId(), and ilOrgUnitTypeTranslation\getInstance().
Referenced by getTranslation().
ilOrgUnitType::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 614 of file class.ilOrgUnitType.php.
References $filename, getIcon(), getIconPath(), ilUtil\makeDirParents(), and updateable().
|
protected |
Read object data from database.
ilOrgUnitTypeException |
Definition at line 801 of file class.ilOrgUnitType.php.
References setCreateDate(), setIcon(), setLastUpdate(), and setOwner().
Referenced by __construct().
ilOrgUnitType::removeIconFile | ( | ) |
Remove the icon file on disk.
Definition at line 636 of file class.ilOrgUnitType.php.
References getIconPath(), setIcon(), and updateable().
ilOrgUnitType::save | ( | ) |
Wrapper around create() and update() methods.
ilOrgUnitTypePluginException |
Definition at line 251 of file class.ilOrgUnitType.php.
References $orgus, getIconPath(), getId(), getOrgUnits(), and League\Flysystem\Adapter\Polyfill\update().
ilOrgUnitType::setCreateDate | ( | $create_date | ) |
string | $create_date |
Definition at line 1011 of file class.ilOrgUnitType.php.
References $create_date.
Referenced by read().
ilOrgUnitType::setDescription | ( | $a_description, | |
$a_lang_code = '' |
|||
) |
Set description of OrgUnit type.
If no lang code is given, sets description for default language.
$a_description | ||
string | $a_lang_code |
Definition at line 371 of file class.ilOrgUnitType.php.
References $lang, and getDefaultLang().
ilOrgUnitType::setIcon | ( | $icon | ) |
Set new Icon filename.
Note that if you did also send a new icon image file with a form, make sure to call ilOrgUnitType::processAndStoreIconFile() to store the file additionally on disk.
If you want to delete the icon, set call ilOrgUnitType::removeIconFile() first and set an empty string here.
string | $icon |
ilOrgUnitTypeException |
Definition at line 932 of file class.ilOrgUnitType.php.
References $icon.
Referenced by read(), and removeIconFile().
ilOrgUnitType::setLastUpdate | ( | $last_update | ) |
string | $last_update |
Definition at line 896 of file class.ilOrgUnitType.php.
References $last_update.
Referenced by read().
ilOrgUnitType::setOwner | ( | $owner | ) |
int | $owner |
Definition at line 878 of file class.ilOrgUnitType.php.
References $owner.
Referenced by read().
ilOrgUnitType::setTitle | ( | $a_title, | |
$a_lang_code = '' |
|||
) |
Set title of OrgUnit type.
If no lang code is given, sets title for default language.
$a_title | ||
string | $a_lang_code |
Definition at line 342 of file class.ilOrgUnitType.php.
References $lang, and getDefaultLang().
ilOrgUnitType::setTranslations | ( | $translations | ) |
Getters & Setters.
array | $translations |
Definition at line 841 of file class.ilOrgUnitType.php.
References $translations.
|
protected |
Helper function to check if this type can be updated.
Definition at line 822 of file class.ilOrgUnitType.php.
Referenced by processAndStoreIconFile(), and removeIconFile().
|
protected |
Definition at line 79 of file class.ilOrgUnitType.php.
Referenced by getTranslation().
|
protected |
Definition at line 47 of file class.ilOrgUnitType.php.
|
staticprotected |
Definition at line 51 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 31 of file class.ilOrgUnitType.php.
Referenced by getCreateDate(), and setCreateDate().
|
protected |
Definition at line 63 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 23 of file class.ilOrgUnitType.php.
Referenced by getAllTypes(), getDefaultLang(), and getIconPath().
|
protected |
Definition at line 39 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 19 of file class.ilOrgUnitType.php.
Referenced by getId(), and getOrgUnits().
|
staticprotected |
Definition at line 89 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 35 of file class.ilOrgUnitType.php.
Referenced by getLastUpdate(), and setLastUpdate().
|
protected |
Definition at line 83 of file class.ilOrgUnitType.php.
Referenced by __construct().
|
protected |
Definition at line 67 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 55 of file class.ilOrgUnitType.php.
Referenced by save().
|
protected |
Definition at line 59 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 27 of file class.ilOrgUnitType.php.
Referenced by getOwner(), and setOwner().
|
protected |
Definition at line 75 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 43 of file class.ilOrgUnitType.php.
Referenced by getTranslations(), and setTranslations().
|
protected |
Definition at line 71 of file class.ilOrgUnitType.php.
const ilOrgUnitType::TABLE_NAME = 'orgu_types' |
Definition at line 11 of file class.ilOrgUnitType.php.
const ilOrgUnitType::WEB_DATA_FOLDER = 'orgu_data' |
Folder in ILIAS webdir to store the icons.
Definition at line 15 of file class.ilOrgUnitType.php.