ILIAS
release_8 Revision v8.19
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct (int $a_id=0) | |
save () | |
Wrapper around create() and update() methods. More... | |
getTitle (string $a_lang_code='') | |
Get the title of an OrgUnit type. More... | |
setTitle (string $a_title, string $a_lang_code='') | |
Set title of OrgUnit type. More... | |
getDescription (string $a_lang_code='') | |
Get the description of an OrgUnit type. More... | |
setDescription (string $a_description, string $a_lang_code='') | |
Set description of OrgUnit type. More... | |
getOrgUnitIds (bool $include_deleted=true) | |
Get an array of IDs of ilObjOrgUnit objects using this type. More... | |
getOrgUnits (bool $include_deleted=true) | |
Get an array of ilObjOrgUnit objects using this type. More... | |
getAssignedAdvancedMDRecords (bool $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... | |
getActivePlugins () | |
Get array of all acitve plugins for the ilOrgUnitTypeHook plugin slot. More... | |
setTranslations (array $translations) | |
Getters & Setters. More... | |
getTranslations () | |
Returns the loaded translation objects. More... | |
setOwner (int $owner) | |
getOwner () | |
setLastUpdate (string $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... | |
getDefaultLang () | |
setCreateDate (string $create_date) | |
getCreateDate () | |
Static Public Member Functions | |
static | getInstance (int $a_id) |
Get instance of an ilOrgUnitType object Returns object from cache or from database, returns null if no object was found. 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 (string $a_member, string $a_lang_code) | |
Protected. More... | |
loadTranslation (string $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 | |
int | $id = 0 |
string | $default_lang = '' |
int | $owner |
string | $create_date |
string | $last_update |
string | $icon = null |
array | $translations = array() |
array | $amd_records_assigned |
array | $orgus = [] |
array | $orgus_ids = [] |
ilDBInterface | $db |
ILIAS DI LoggingServices | $log |
ilObjUser | $user |
array | $active_plugins |
ilLanguage | $lng |
ilComponentFactory | $component_factory |
Static Protected Attributes | |
static array | $amd_records_available = null |
static array | $instances = array() |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilOrgUnitType
Definition at line 24 of file class.ilOrgUnitType.php.
ilOrgUnitType::__construct | ( | int | $a_id = 0 | ) |
ilOrgUnitTypeException |
Definition at line 55 of file class.ilOrgUnitType.php.
References $DIC, ILIAS\Repository\int(), ILIAS\Repository\lng(), read(), and ILIAS\Repository\user().
ilOrgUnitType::getActivePlugins | ( | ) |
Get array of all acitve plugins for the ilOrgUnitTypeHook plugin slot.
Definition at line 654 of file class.ilOrgUnitType.php.
Referenced by getAllTypes(), getAvailableAdvancedMDRecords(), getIconPath(), getTranslation(), save(), and updateable().
|
static |
Get array of all instances of ilOrgUnitType objects.
Definition at line 97 of file class.ilOrgUnitType.php.
References $DIC, $ilDB, $lang, XapiProxy\$plugin, $type, getActivePlugins(), getDefaultLang(), getIcon(), getId(), getOwner(), getTranslation(), ILIAS\Repository\lng(), and ILIAS\Repository\user().
Referenced by ilOrgUnitTypeTableGUI\initColumns(), and ilObjOrgUnitSettingsFormGUI\saveObject().
ilOrgUnitType::getAssignedAdvancedMDRecords | ( | bool | $a_only_active = false | ) |
Get assigned AdvancedMDRecord objects.
bool | $a_only_active | True if only active AMDRecords are returned |
Definition at line 374 of file class.ilOrgUnitType.php.
References getId().
|
static |
Get all available AdvancedMDRecord objects for OrgUnits/Types.
Definition at line 417 of file class.ilOrgUnitType.php.
References ILIAS\LTI\ToolProvider\$key, XapiProxy\$plugin, ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), getActivePlugins(), getId(), getOrgUnitIds(), ILIAS\Repository\lng(), and ilAdvancedMDRecord\saveObjRecSelection().
Referenced by ilOrgUnitTypeAdvancedMetaDataFormGUI\saveObject().
ilOrgUnitType::getCreateDate | ( | ) |
ilOrgUnitType::getDefaultLang | ( | ) |
Definition at line 845 of file class.ilOrgUnitType.php.
References $default_lang.
Referenced by getAllTypes(), getTranslation(), setDescription(), and setTitle().
ilOrgUnitType::getDescription | ( | string | $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 289 of file class.ilOrgUnitType.php.
References getTranslation().
ilOrgUnitType::getIcon | ( | ) |
Definition at line 792 of file class.ilOrgUnitType.php.
References $icon.
Referenced by getAllTypes(), getIconPath(), and processAndStoreIconFile().
ilOrgUnitType::getIconPath | ( | bool | $append_filename = false | ) |
Return the path to the icon.
bool | $append_filename | If true, append filename of icon |
Definition at line 802 of file class.ilOrgUnitType.php.
References $default_lang, $path, XapiProxy\$plugin, getActivePlugins(), getIcon(), getId(), ilFileUtils\getWebspaceDir(), and ILIAS\Repository\lng().
Referenced by processAndStoreIconFile(), removeIconFile(), and save().
ilOrgUnitType::getId | ( | ) |
Definition at line 772 of file class.ilOrgUnitType.php.
References $id.
Referenced by getAllTypes(), getAssignedAdvancedMDRecords(), getAvailableAdvancedMDRecords(), getIconPath(), getOrgUnitIds(), getTranslation(), getTranslations(), loadTranslation(), and save().
|
static |
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 75 of file class.ilOrgUnitType.php.
References Vendor\Package\$e, and $type.
Referenced by ilObjOrgUnit\getIconsCache(), ilObjOrgUnit\getOrgUnitType(), and ilModulesOrgUnitTest\testIfOrgUnitHasRequiredLocalRoles().
ilOrgUnitType::getLastUpdate | ( | ) |
ilOrgUnitType::getOrgUnitIds | ( | bool | $include_deleted = true | ) |
Get an array of IDs of ilObjOrgUnit objects using this type.
bool | $include_deleted |
Definition at line 311 of file class.ilOrgUnitType.php.
References getId().
Referenced by getAvailableAdvancedMDRecords(), and getOrgUnits().
ilOrgUnitType::getOrgUnits | ( | bool | $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 341 of file class.ilOrgUnitType.php.
References $ref_id, ilObject\_getAllReferences(), ilObject\_isInTrash(), and getOrgUnitIds().
Referenced by save().
ilOrgUnitType::getOwner | ( | ) |
Definition at line 757 of file class.ilOrgUnitType.php.
References $owner.
Referenced by getAllTypes().
ilOrgUnitType::getTitle | ( | string | $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 265 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 564 of file class.ilOrgUnitType.php.
References $lang, XapiProxy\$plugin, getActivePlugins(), getDefaultLang(), getId(), ILIAS\Repository\lng(), loadTranslation(), and ILIAS\Repository\user().
Referenced by getAllTypes(), getDescription(), and getTitle().
ilOrgUnitType::getTranslations | ( | ) |
Returns the loaded translation objects.
Definition at line 732 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 665 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 524 of file class.ilOrgUnitType.php.
References $filename, getIcon(), getIconPath(), ilFileUtils\makeDirParents(), ilFileUtils\moveUploadedFile(), and updateable().
|
protected |
Read object data from database.
ilOrgUnitTypeException |
Definition at line 685 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 542 of file class.ilOrgUnitType.php.
References getIconPath(), setIcon(), and updateable().
ilOrgUnitType::save | ( | ) |
Wrapper around create() and update() methods.
ilOrgUnitTypePluginException |
Definition at line 189 of file class.ilOrgUnitType.php.
References XapiProxy\$plugin, getActivePlugins(), getIconPath(), getId(), getOrgUnits(), and ILIAS\Repository\lng().
ilOrgUnitType::setCreateDate | ( | string | $create_date | ) |
Definition at line 850 of file class.ilOrgUnitType.php.
References $create_date.
Referenced by read().
ilOrgUnitType::setDescription | ( | string | $a_description, |
string | $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 300 of file class.ilOrgUnitType.php.
References $lang, and getDefaultLang().
ilOrgUnitType::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 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.
ilOrgUnitTypeException |
Definition at line 784 of file class.ilOrgUnitType.php.
References $icon.
Referenced by read(), and removeIconFile().
ilOrgUnitType::setLastUpdate | ( | string | $last_update | ) |
Definition at line 762 of file class.ilOrgUnitType.php.
References $last_update.
Referenced by read().
ilOrgUnitType::setOwner | ( | int | $owner | ) |
Definition at line 752 of file class.ilOrgUnitType.php.
References $owner.
Referenced by read().
ilOrgUnitType::setTitle | ( | string | $a_title, |
string | $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 276 of file class.ilOrgUnitType.php.
References $lang, and getDefaultLang().
ilOrgUnitType::setTranslations | ( | array | $translations | ) |
Getters & Setters.
string[] | $translations |
Definition at line 723 of file class.ilOrgUnitType.php.
References $translations.
|
protected |
Helper function to check if this type can be updated.
Definition at line 704 of file class.ilOrgUnitType.php.
References XapiProxy\$plugin, and getActivePlugins().
Referenced by processAndStoreIconFile(), and removeIconFile().
|
protected |
Definition at line 45 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 38 of file class.ilOrgUnitType.php.
|
staticprotected |
Definition at line 39 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 49 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 34 of file class.ilOrgUnitType.php.
Referenced by getCreateDate(), and setCreateDate().
|
protected |
Definition at line 42 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 32 of file class.ilOrgUnitType.php.
Referenced by getDefaultLang(), and getIconPath().
|
protected |
Definition at line 36 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 31 of file class.ilOrgUnitType.php.
Referenced by getId().
|
staticprotected |
self[] |
Definition at line 48 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 35 of file class.ilOrgUnitType.php.
Referenced by getLastUpdate(), and setLastUpdate().
|
protected |
Definition at line 46 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 43 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 40 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 41 of file class.ilOrgUnitType.php.
|
protected |
Definition at line 33 of file class.ilOrgUnitType.php.
Referenced by getOwner(), and setOwner().
|
protected |
Definition at line 37 of file class.ilOrgUnitType.php.
Referenced by getTranslations(), and setTranslations().
|
protected |
Definition at line 44 of file class.ilOrgUnitType.php.
const ilOrgUnitType::TABLE_NAME = 'orgu_types' |
Definition at line 26 of file class.ilOrgUnitType.php.
const ilOrgUnitType::WEB_DATA_FOLDER = 'orgu_data' |
Folder in ILIAS webdir to store the icons.
Definition at line 30 of file class.ilOrgUnitType.php.