ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilOrgUnitType Class Reference

Class ilOrgUnitType. More...

+ Collaboration diagram for ilOrgUnitType:

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()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitType::__construct (   $a_id = 0)
Parameters
int$a_id
Exceptions
ilOrgUnitTypeException

Definition at line 101 of file class.ilOrgUnitType.php.

References $DIC, $ilDB, $ilLog, $ilUser, $lng, read(), and user().

101  {
102  global $DIC;
103  $ilDB = $DIC['ilDB'];
104  $ilLog = $DIC['ilLog'];
105  $ilUser = $DIC['ilUser'];
106  $ilPluginAdmin = $DIC['ilPluginAdmin'];
107  $lng = $DIC['lng'];
108  $this->db = $ilDB;
109  $this->log = $ilLog;
110  $this->user = $ilUser;
111  $this->pluginAdmin = $ilPluginAdmin;
112  $this->lng = $lng;
113  if ($a_id) {
114  $this->id = (int)$a_id;
115  $this->read();
116  }
117  }
user()
Definition: user.php:4
read()
Read object data from database.
$ilUser
Definition: imgupload.php:18
global $ilDB
global $DIC
+ Here is the call graph for this function:

Member Function Documentation

◆ getAllTypes()

static ilOrgUnitType::getAllTypes ( )
static

Get array of all instances of ilOrgUnitType objects.

Returns
array

Definition at line 155 of file class.ilOrgUnitType.php.

References $default_lang, $DIC, $ilDB, $lang, $title, array, date, getDefaultLang(), getIcon(), getId(), getOwner(), getTranslation(), and user().

Referenced by ilOrgUnitTypeTableGUI\initColumns(), and ilObjOrgUnitSettingsFormGUI\saveObject().

155  {
156  global $DIC;
157  $ilDB = $DIC['ilDB'];
158  $sql = 'SELECT id FROM ' . self::TABLE_NAME;
159  $set = $ilDB->query($sql);
160  $types = array();
161  while ($rec = $ilDB->fetchObject($set)) {
162  $type = new self($rec->id);
163  $types[] = $type;
164  self::$instances[$rec->id] = $type;
165  }
166 
167  return $types;
168  }
Create styles array
The data for the language used.
global $ilDB
global $DIC
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignedAdvancedMDRecords()

ilOrgUnitType::getAssignedAdvancedMDRecords (   $a_only_active = false)

Get assigned AdvancedMDRecord objects.

Parameters
bool$a_only_activeTrue if only active AMDRecords are returned
Returns
array

Definition at line 439 of file class.ilOrgUnitType.php.

References array, and getId().

439  {
440  $active = ($a_only_active) ? 1 : 0; // Cache key
441  if (is_array($this->amd_records_assigned[$active])) {
442  return $this->amd_records_assigned[$active];
443  }
444  $this->amd_records_assigned[$active] = array();
445  $sql = 'SELECT * FROM orgu_types_adv_md_rec WHERE type_id = ' . $this->db->quote($this->getId(), 'integer');
446  $set = $this->db->query($sql);
447  while ($rec = $this->db->fetchObject($set)) {
448  $amd_record = new ilAdvancedMDRecord($rec->rec_id);
449  if ($a_only_active) {
450  if ($amd_record->isActive()) {
451  $this->amd_records_assigned[1][] = $amd_record;
452  }
453  } else {
454  $this->amd_records_assigned[0][] = $amd_record;
455  }
456  }
457 
458  return $this->amd_records_assigned[$active];
459  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getAvailableAdvancedMDRecords()

static ilOrgUnitType::getAvailableAdvancedMDRecords ( )
static

Get all available AdvancedMDRecord objects for OrgUnits/Types.

Returns
array

Definition at line 485 of file class.ilOrgUnitType.php.

References ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), array, getId(), getOrgUnitIds(), and ilAdvancedMDRecord\saveObjRecSelection().

Referenced by ilOrgUnitTypeAdvancedMetaDataFormGUI\saveObject().

485  {
486  if (is_array(self::$amd_records_available)) {
487  return self::$amd_records_available;
488  }
489  self::$amd_records_available = ilAdvancedMDRecord::_getActivatedRecordsByObjectType('orgu', 'orgu_type');
490 
491  return self::$amd_records_available;
492  }
static _getActivatedRecordsByObjectType($a_obj_type, $a_sub_type="", $a_only_optional=false)
Get activated records by object type.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCreateDate()

ilOrgUnitType::getCreateDate ( )
Returns
string

Definition at line 983 of file class.ilOrgUnitType.php.

References $create_date.

983  {
984  return $this->create_date;
985  }

◆ getDefaultLang()

ilOrgUnitType::getDefaultLang ( )
Returns
string

Definition at line 967 of file class.ilOrgUnitType.php.

References $default_lang.

Referenced by getAllTypes(), getTranslation(), setDescription(), and setTitle().

967  {
968  return $this->default_lang;
969  }
+ Here is the caller graph for this function:

◆ getDescription()

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.

Parameters
string$a_lang_code
Returns
null|string

Definition at line 353 of file class.ilOrgUnitType.php.

References getTranslation().

353  {
354  return $this->getTranslation('description', $a_lang_code);
355  }
getTranslation($a_member, $a_lang_code)
Protected.
+ Here is the call graph for this function:

◆ getIcon()

ilOrgUnitType::getIcon ( )
Returns
string

Definition at line 912 of file class.ilOrgUnitType.php.

References $icon.

Referenced by getAllTypes(), getIconPath(), and processAndStoreIconFile().

912  {
913  return $this->icon;
914  }
+ Here is the caller graph for this function:

◆ getIconPath()

ilOrgUnitType::getIconPath (   $append_filename = false)

Return the path to the icon.

Parameters
bool$append_filenameIf true, append filename of icon
Returns
string

Definition at line 924 of file class.ilOrgUnitType.php.

References $default_lang, $path, array, getIcon(), getId(), and ilUtil\getWebspaceDir().

Referenced by processAndStoreIconFile(), removeIconFile(), and save().

924  {
925  $path = ilUtil::getWebspaceDir() . '/' . self::WEB_DATA_FOLDER . '/' . 'type_' . $this->getId() . '/';
926  if ($append_filename) {
927  $path .= $this->getIcon();
928  }
929 
930  return $path;
931  }
$path
Definition: aliased.php:25
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

ilOrgUnitType::getId ( )
Returns
int

Definition at line 884 of file class.ilOrgUnitType.php.

References $id.

Referenced by getAllTypes(), getAssignedAdvancedMDRecords(), getAvailableAdvancedMDRecords(), getIconPath(), getOrgUnitIds(), getTranslation(), getTranslations(), loadTranslation(), and save().

884  {
885  return $this->id;
886  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilOrgUnitType::getInstance (   $a_id)
static

Public.

Get instance of an ilOrgUnitType object Returns object from cache or from database, returns null if no object was found

Parameters
int$a_idID of the OrgUnit type
Returns
ilOrgUnitType|null

Definition at line 131 of file class.ilOrgUnitType.php.

Referenced by ilObjOrgUnit\getOrgUnitType(), and ilObjOrgUnit\setOrgUnitTypeId().

131  {
132  if (!$a_id) {
133  return NULL;
134  }
135  if (isset(self::$instances[$a_id])) {
136  return self::$instances[$a_id];
137  } else {
138  try {
139  $type = new self($a_id);
140  self::$instances[$a_id] = $type;
141 
142  return $type;
143  } catch (ilOrgUnitTypeException $e) {
144  return NULL;
145  }
146  }
147  }
Class ilOrgUnitTypeException.
+ Here is the caller graph for this function:

◆ getLastUpdate()

ilOrgUnitType::getLastUpdate ( )
Returns
string

Definition at line 876 of file class.ilOrgUnitType.php.

References $last_update.

876  {
877  return $this->last_update;
878  }

◆ getOrgUnitIds()

ilOrgUnitType::getOrgUnitIds (   $include_deleted = true)

Get an array of IDs of ilObjOrgUnit objects using this type.

Parameters
bool$include_deleted
Returns
array

Definition at line 378 of file class.ilOrgUnitType.php.

References array, and getId().

Referenced by getAvailableAdvancedMDRecords(), and getOrgUnits().

378  {
379  $cache_key = ($include_deleted) ? 1 : 0;
380  if (is_array($this->orgus_ids[$cache_key])) {
381  return $this->orgus_ids[$cache_key];
382  }
383  if ($include_deleted) {
384  $sql = 'SELECT * FROM orgu_data WHERE orgu_type_id = ' . $this->db->quote($this->getId(), 'integer');
385  } else {
386  $sql =
387  'SELECT DISTINCT orgu_id FROM orgu_data od ' . 'JOIN object_reference oref ON oref.obj_id = od.orgu_id ' . 'WHERE od.orgu_type_id = '
388  . $this->db->quote($this->getId(), 'integer') . ' AND oref.deleted IS NULL';
389  }
390  $set = $this->db->query($sql);
391  $this->orgus_ids[$cache_key] = array();
392  while ($rec = $this->db->fetchObject($set)) {
393  $this->orgus_ids[$cache_key][] = $rec->orgu_id;
394  }
395 
396  return $this->orgus_ids[$cache_key];
397  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOrgUnits()

ilOrgUnitType::getOrgUnits (   $include_deleted = true)

Get an array of ilObjOrgUnit objects using this type.

Parameters
bool$include_deletedTrue if also deleted OrgUnits are returned
Returns
array

Definition at line 407 of file class.ilOrgUnitType.php.

References $id, $ref_id, ilObject\_getAllReferences(), ilObject\_isInTrash(), array, and getOrgUnitIds().

Referenced by save().

407  {
408  $cache_key = ($include_deleted) ? 1 : 0;
409  if (is_array($this->orgus[$cache_key])) {
410  return $this->orgus[$cache_key];
411  }
412  $this->orgus[$cache_key] = array();
413  $ids = $this->getOrgUnitIds($include_deleted);
414  foreach ($ids as $id) {
415  $orgu = new ilObjOrgUnit($id, false);
416  if (!$include_deleted) {
417  // Check if OrgUnit is in trash (each OrgUnit does only have one reference)
418  $ref_ids = ilObject::_getAllReferences($id);
419  $ref_ids = array_values($ref_ids);
420  $ref_id = $ref_ids[0];
422  continue;
423  }
424  }
425  $this->orgus[$cache_key][] = $orgu;
426  }
427 
428  return $this->orgus[$cache_key];
429  }
static _isInTrash($a_ref_id)
checks wether object is in trash
static _getAllReferences($a_id)
get all reference ids of object
getOrgUnitIds($include_deleted=true)
Get an array of IDs of ilObjOrgUnit objects using this type.
Class ilObjOrgUnit.
Create styles array
The data for the language used.
$ref_id
Definition: sahs_server.php:39
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOwner()

ilOrgUnitType::getOwner ( )
Returns
int

Definition at line 860 of file class.ilOrgUnitType.php.

References $owner.

Referenced by getAllTypes().

860  {
861  return $this->owner;
862  }
+ Here is the caller graph for this function:

◆ getTitle()

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.

Parameters
string$a_lang_code
Returns
null|string

Definition at line 326 of file class.ilOrgUnitType.php.

References getTranslation().

326  {
327  return $this->getTranslation('title', $a_lang_code);
328  }
getTranslation($a_member, $a_lang_code)
Protected.
+ Here is the call graph for this function:

◆ getTranslation()

ilOrgUnitType::getTranslation (   $a_member,
  $a_lang_code 
)
protected

Protected.

Helper method to return a translation for a given member and language

Parameters
$a_member
$a_lang_code
Returns
null|string

Definition at line 643 of file class.ilOrgUnitType.php.

References $active_plugins, $lang, array, getDefaultLang(), getId(), IL_COMP_MODULE, loadTranslation(), and user().

Referenced by getAllTypes(), getDescription(), and getTitle().

643  {
644  $lang = ($a_lang_code) ? $a_lang_code : $this->user->getLanguage();
645  $trans_obj = $this->loadTranslation($lang);
646  if (!is_null($trans_obj)) {
647  $translation = $trans_obj->getMember($a_member);
648  // If the translation does exist but is an empty string and there was no lang code given,
649  // substitute default language anyway because an empty string provides no information
650  if (!$a_lang_code && !$translation) {
651  $trans_obj = $this->loadTranslation($this->getDefaultLang());
652 
653  return $trans_obj->getMember($a_member);
654  }
655 
656  return $translation;
657  } else {
658  // If no lang code was given and there was no translation found, return string in default language
659  if (!$a_lang_code) {
660  $trans_obj = $this->loadTranslation($this->getDefaultLang());
661 
662  return $trans_obj->getMember($a_member);
663  }
664 
665  return NULL;
666  }
667  }
user()
Definition: user.php:4
loadTranslation($a_lang_code)
Helper function to load a translation.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTranslations()

ilOrgUnitType::getTranslations ( )

Returns the loaded translation objects.

Returns
array

Definition at line 828 of file class.ilOrgUnitType.php.

References $translations, and getId().

828  {
829  return $this->translations;
830  }
+ Here is the call graph for this function:

◆ loadTranslation()

ilOrgUnitType::loadTranslation (   $a_lang_code)
protected

Helper function to load a translation.

Returns translation object from cache or null, if no translation exists for the given code.

Parameters
string$a_lang_codeA language code
Returns
ilOrgUnitTypeTranslation|null

Definition at line 759 of file class.ilOrgUnitType.php.

References getId(), and ilOrgUnitTypeTranslation\getInstance().

Referenced by getTranslation().

759  {
760  if (isset($this->translations[$a_lang_code])) {
761  return $this->translations[$a_lang_code];
762  } else {
763  $trans_obj = ilOrgUnitTypeTranslation::getInstance($this->getId(), $a_lang_code);
764  if (!is_null($trans_obj)) {
765  $this->translations[$a_lang_code] = $trans_obj;
766 
767  return $trans_obj;
768  }
769  }
770 
771  return NULL;
772  }
static getInstance($a_orgu_type_id, $a_lang_code)
Public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processAndStoreIconFile()

ilOrgUnitType::processAndStoreIconFile ( array  $file_data)

Resize and store an icon file for this object.

Parameters
array$file_dataThe array containing file information from the icon from PHPs $_FILES array
Returns
bool

Definition at line 599 of file class.ilOrgUnitType.php.

References $filename, getIcon(), getIconPath(), ilUtil\makeDirParents(), ilUtil\moveUploadedFile(), and updateable().

599  {
600  if (!$this->updateable()) {
601  return false;
602  }
603  if (!count($file_data) || !$file_data['name']) {
604  return false;
605  }
606  if (!is_dir($this->getIconPath())) {
608  }
609  $filename = $this->getIcon() ? $this->getIcon() : $file_data['name'];
610  $return = ilUtil::moveUploadedFile($file_data['tmp_name'], $filename, $this->getIconPath(true), false);
611 
612  // TODO Resize
613  return $return;
614  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
updateable()
Helper function to check if this type can be updated.
getIconPath($append_filename=false)
Return the path to the icon.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
+ Here is the call graph for this function:

◆ read()

ilOrgUnitType::read ( )
protected

Read object data from database.

Exceptions
ilOrgUnitTypeException

Definition at line 780 of file class.ilOrgUnitType.php.

References setCreateDate(), setIcon(), setLastUpdate(), and setOwner().

Referenced by __construct().

780  {
781  $sql = 'SELECT * FROM ' . self::TABLE_NAME . ' WHERE id = ' . $this->db->quote($this->id, 'integer');
782  $set = $this->db->query($sql);
783  if (!$this->db->numRows($set)) {
784  throw new ilOrgUnitTypeException("OrgUnit type with id {$this->id} does not exist in database");
785  }
786  $rec = $this->db->fetchObject($set);
787  $this->default_lang = $rec->default_lang; // Don't use Setter because of unnecessary plugin checks
788  $this->setCreateDate($rec->create_date);
789  $this->setLastUpdate($rec->last_update);
790  $this->setOwner($rec->owner);
791  $this->setIcon($rec->icon);
792  }
Class ilOrgUnitTypeException.
setIcon($icon)
Set new Icon filename.
setCreateDate($create_date)
setLastUpdate($last_update)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeIconFile()

ilOrgUnitType::removeIconFile ( )

Remove the icon file on disk.

Definition at line 620 of file class.ilOrgUnitType.php.

References getIconPath(), setIcon(), and updateable().

620  {
621  if (!$this->updateable()) {
622  return;
623  }
624  if (is_file($this->getIconPath(true))) {
625  unlink($this->getIconPath(true));
626  $this->setIcon('');
627  }
628  }
updateable()
Helper function to check if this type can be updated.
setIcon($icon)
Set new Icon filename.
getIconPath($append_filename=false)
Return the path to the icon.
+ Here is the call graph for this function:

◆ save()

ilOrgUnitType::save ( )

Wrapper around create() and update() methods.

Exceptions
ilOrgUnitTypePluginException

Definition at line 250 of file class.ilOrgUnitType.php.

References $orgus, array, getIconPath(), getId(), and getOrgUnits().

250  {
251  if ($this->getId()) {
252  $this->update();
253  } else {
254  $this->create();
255  }
256  }
+ Here is the call graph for this function:

◆ setCreateDate()

ilOrgUnitType::setCreateDate (   $create_date)
Parameters
string$create_date

Definition at line 975 of file class.ilOrgUnitType.php.

References $create_date.

Referenced by read().

975  {
976  $this->create_date = $create_date;
977  }
+ Here is the caller graph for this function:

◆ setDescription()

ilOrgUnitType::setDescription (   $a_description,
  $a_lang_code = '' 
)

Set description of OrgUnit type.

If no lang code is given, sets description for default language.

Parameters
$a_description
string$a_lang_code

Definition at line 365 of file class.ilOrgUnitType.php.

References $lang, and getDefaultLang().

365  {
366  $lang = ($a_lang_code) ? $a_lang_code : $this->getDefaultLang();
367  $this->setTranslation('description', $a_description, $lang);
368  }
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
+ Here is the call graph for this function:

◆ setIcon()

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.

Parameters
string$icon
Exceptions
ilOrgUnitTypeException

Definition at line 901 of file class.ilOrgUnitType.php.

References $icon.

Referenced by read(), and removeIconFile().

901  {
902  if ($icon AND !preg_match('/\.(svg)$/', $icon)) {
903  throw new ilOrgUnitTypeException('Icon must be set with file extension svg');
904  }
905  $this->icon = $icon;
906  }
Class ilOrgUnitTypeException.
+ Here is the caller graph for this function:

◆ setLastUpdate()

ilOrgUnitType::setLastUpdate (   $last_update)
Parameters
string$last_update

Definition at line 868 of file class.ilOrgUnitType.php.

References $last_update.

Referenced by read().

868  {
869  $this->last_update = $last_update;
870  }
+ Here is the caller graph for this function:

◆ setOwner()

ilOrgUnitType::setOwner (   $owner)
Parameters
int$owner

Definition at line 852 of file class.ilOrgUnitType.php.

References $owner.

Referenced by read().

852  {
853  $this->owner = $owner;
854  }
+ Here is the caller graph for this function:

◆ setTitle()

ilOrgUnitType::setTitle (   $a_title,
  $a_lang_code = '' 
)

Set title of OrgUnit type.

If no lang code is given, sets title for default language.

Parameters
$a_title
string$a_lang_code

Definition at line 338 of file class.ilOrgUnitType.php.

References $lang, and getDefaultLang().

338  {
339  $lang = ($a_lang_code) ? $a_lang_code : $this->getDefaultLang();
340  $this->setTranslation('title', $a_title, $lang);
341  }
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
Definition: langwiz.php:349
+ Here is the call graph for this function:

◆ setTranslations()

ilOrgUnitType::setTranslations (   $translations)

Getters & Setters.

Parameters
array$translations

Definition at line 818 of file class.ilOrgUnitType.php.

References $translations.

818  {
819  $this->translations = $translations;
820  }

◆ updateable()

ilOrgUnitType::updateable ( )
protected

Helper function to check if this type can be updated.

Returns
bool

Definition at line 800 of file class.ilOrgUnitType.php.

Referenced by processAndStoreIconFile(), and removeIconFile().

800  {
801  foreach ($this->getActivePlugins() as $plugin) {
802  if (!$plugin->allowUpdate($this->getId())) {
803  return false;
804  }
805  }
806 
807  return true;
808  }
+ Here is the caller graph for this function:

Field Documentation

◆ $active_plugins

ilOrgUnitType::$active_plugins
protected

Definition at line 83 of file class.ilOrgUnitType.php.

Referenced by getTranslation().

◆ $amd_records_assigned

ilOrgUnitType::$amd_records_assigned
protected

Definition at line 51 of file class.ilOrgUnitType.php.

◆ $amd_records_available

ilOrgUnitType::$amd_records_available
staticprotected

Definition at line 55 of file class.ilOrgUnitType.php.

◆ $create_date

ilOrgUnitType::$create_date
protected

Definition at line 35 of file class.ilOrgUnitType.php.

Referenced by getCreateDate(), and setCreateDate().

◆ $db

ilOrgUnitType::$db
protected

Definition at line 67 of file class.ilOrgUnitType.php.

◆ $default_lang

ilOrgUnitType::$default_lang = ''
protected

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

Referenced by getAllTypes(), getDefaultLang(), and getIconPath().

◆ $icon

ilOrgUnitType::$icon
protected

Definition at line 43 of file class.ilOrgUnitType.php.

Referenced by getIcon(), and setIcon().

◆ $id

ilOrgUnitType::$id = 0
protected

Definition at line 23 of file class.ilOrgUnitType.php.

Referenced by getId(), and getOrgUnits().

◆ $instances

ilOrgUnitType::$instances = array()
staticprotected

Definition at line 93 of file class.ilOrgUnitType.php.

◆ $last_update

ilOrgUnitType::$last_update
protected

Definition at line 39 of file class.ilOrgUnitType.php.

Referenced by getLastUpdate(), and setLastUpdate().

◆ $lng

ilOrgUnitType::$lng
protected

Definition at line 87 of file class.ilOrgUnitType.php.

Referenced by __construct().

◆ $log

ilOrgUnitType::$log
protected

Definition at line 71 of file class.ilOrgUnitType.php.

◆ $orgus

ilOrgUnitType::$orgus
protected

Definition at line 59 of file class.ilOrgUnitType.php.

Referenced by save().

◆ $orgus_ids

ilOrgUnitType::$orgus_ids
protected

Definition at line 63 of file class.ilOrgUnitType.php.

◆ $owner

ilOrgUnitType::$owner
protected

Definition at line 31 of file class.ilOrgUnitType.php.

Referenced by getOwner(), and setOwner().

◆ $pluginAdmin

ilOrgUnitType::$pluginAdmin
protected

Definition at line 79 of file class.ilOrgUnitType.php.

◆ $translations

ilOrgUnitType::$translations = array()
protected

Definition at line 47 of file class.ilOrgUnitType.php.

Referenced by getTranslations(), and setTranslations().

◆ $user

ilOrgUnitType::$user
protected

Definition at line 75 of file class.ilOrgUnitType.php.

◆ TABLE_NAME

const ilOrgUnitType::TABLE_NAME = 'orgu_types'

Definition at line 15 of file class.ilOrgUnitType.php.

◆ WEB_DATA_FOLDER

const ilOrgUnitType::WEB_DATA_FOLDER = 'orgu_data'

Folder in ILIAS webdir to store the icons.

Definition at line 19 of file class.ilOrgUnitType.php.


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