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

Class ilStudyProgrammeType. More...

+ Inheritance diagram for ilStudyProgrammeType:
+ Collaboration diagram for ilStudyProgrammeType:

Public Member Functions

 __construct ($primary_key=0)
 
 getTitle ($a_lang_code='')
 Get the title of an StudyProgramme type. More...
 
 setTitle ($a_title, $a_lang_code='')
 Set title of StudyProgramme type. More...
 
 getDescription ($a_lang_code='')
 Get the description of an StudyProgramme type. More...
 
 setDescription ($a_description, $a_lang_code='')
 Set description of StudyProgramme type. More...
 
 getAssignedStudyProgrammes ($include_deleted=true)
 Get an array of ilObjStudyProgramme objects using this type. More...
 
 getAssignedStudyProgrammeIds ()
 
 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 ()
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 
 setConnectorContainerName ($connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0, arConnector $connector=null)
 
 storeObjectToCache ()
 
 __getConvertedDateFieldsAsArray ($format=null)
 
 __asCsv ($separator=';', $header=false)
 
 __asArray ()
 
 __asStdClass ()
 
 __asSerializedObject ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForDb ()
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy ($new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 
static getAllTypes ()
 Public. More...
 
static getAllTypesArray ($add_empty_on_begin=true)
 
static getAvailableAdvancedMDRecords ()
 Get all available AdvancedMDRecord objects for StudyProgrammes/Types. More...
 
static getIconPathByStudyProgrammObjId ($obj_id)
 Return the path to the icon by studyprogramme obj id. More...
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField ($old_name, $new_name)
 
static tableExists ()
 
static fieldExists ($field_name)
 
static removeDBField ($field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 
static preloadObjects ()
 
static additionalParams (array $additional_params)
 
static findOrFail ($primary_key, array $add_constructor_args=array())
 Tries to find the object and throws an Exception if object is not found, instead of returning null. More...
 
static findOrGetInstance ($primary_key, array $add_constructor_args=array())
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $ar, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static innerjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static leftjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static orderBy ($orderBy, $orderDirection='ASC')
 
static dateFormat ($date_format='d.m.Y - H:i:s')
 
static limit ($start, $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $connector)
 
static raw ($set_raw=true)
 
static getArray ($key=null, $values=null)
 
static _toCamelCase ($str, $capitalise_first_char=false)
 

Data Fields

const WEB_DATA_FOLDER = 'prg_data'
 Folder in ILIAS webdir to store the icons. More...
 
- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 

Protected Member Functions

 getTranslation ($a_member, $a_lang_code)
 Protected. More...
 
 loadTranslation ($a_lang_code)
 Helper function to load a translation. More...
 
 updateable ()
 Helper function to check if this type can be updated. More...
 
- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv. More...
 
 installDatabase ()
 

Protected Attributes

 $id = 0
 
 $default_lang = ''
 
 $owner
 
 $create_date
 
 $last_update
 
 $icon
 
 $amd_records_assigned
 
 $log
 
 $user
 
 $pluginAdmin
 
 $active_plugins
 
 $lng
 
 $translations
 
 $changed_translations = array()
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Static Protected Attributes

static $amd_records_available
 

Additional Inherited Members

- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 
static fromCamelCase ($str)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeType::__construct (   $primary_key = 0)
Parameters
int$a_id
Exceptions
ilStudyProgrammeTypeException

Definition at line 139 of file class.ilStudyProgrammeType.php.

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

139  {
140  global $DIC;
141  $ilDB = $DIC['ilDB'];
142  $ilLog = $DIC['ilLog'];
143  $ilUser = $DIC['ilUser'];
144  $ilPluginAdmin = $DIC['ilPluginAdmin'];
145  $lng = $DIC['lng'];
146  $this->db = $ilDB;
147  $this->log = $ilLog;
148  $this->user = $ilUser;
149  $this->pluginAdmin = $ilPluginAdmin;
150  $this->lng = $lng;
151 
152  parent::__construct($primary_key);
153  }
user()
Definition: user.php:4
$ilUser
Definition: imgupload.php:18
global $ilDB
global $DIC
+ Here is the call graph for this function:

Member Function Documentation

◆ getAllTypes()

static ilStudyProgrammeType::getAllTypes ( )
static

Public.

Get array of all instances of ilStudyProgrammeType objects

Returns
array

Definition at line 164 of file class.ilStudyProgrammeType.php.

Referenced by ilStudyProgrammeTypeTableGUI\initColumns().

164  {
165  return self::get();
166  }
+ Here is the caller graph for this function:

◆ getAllTypesArray()

static ilStudyProgrammeType::getAllTypesArray (   $add_empty_on_begin = true)
static

Definition at line 168 of file class.ilStudyProgrammeType.php.

References $default_lang, $lang, $out, $records, $title, array, ActiveRecord\count(), ActiveRecord\create(), ilStudyProgrammeTypeTranslation\deleteAllTranslations(), getDefaultLang(), getIconPath(), getId(), ilObject\getTitle(), getTranslation(), IL_CAL_UNIX, setCreateDate(), setLastUpdate(), setOwner(), time, ActiveRecord\update(), user(), and ActiveRecord\where().

Referenced by ilObjStudyProgrammeSettingsGUI\buildForm().

168  {
169  $out = array();
170 
171  foreach(self::getAllTypes() as $type) {
172  $out[$type->getId()] = $type->getTitle();
173  }
174 
175  if($add_empty_on_begin)
176  $out = array('-'=>'-') + $out;
177 
178  return $out;
179  }
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:

◆ getAssignedAdvancedMDRecords()

ilStudyProgrammeType::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 398 of file class.ilStudyProgrammeType.php.

References array, getId(), and ActiveRecord\where().

398  {
399  $active = ($a_only_active) ? 1 : 0; // Cache key
400  if (is_array($this->amd_records_assigned[$active])) {
401  return $this->amd_records_assigned[$active];
402  }
403  $this->amd_records_assigned[$active] = array();
404  $sets = ilStudyProgrammeAdvancedMetadataRecord::where(array('type_id'=>$this->getId()))->get();
405 
406  foreach($sets as $set) {
407  $amd_record = new ilAdvancedMDRecord($set->getRecId());
408  if ($a_only_active) {
409  if ($amd_record->isActive()) {
410  $this->amd_records_assigned[1][] = $amd_record;
411  }
412  } else {
413  $this->amd_records_assigned[0][] = $amd_record;
414  }
415  }
416 
417  return $this->amd_records_assigned[$active];
418  }
static where($where, $operator=null)
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getAssignedStudyProgrammeIds()

ilStudyProgrammeType::getAssignedStudyProgrammeIds ( )

Definition at line 379 of file class.ilStudyProgrammeType.php.

References $out, array, and getAssignedStudyProgrammes().

Referenced by getAvailableAdvancedMDRecords().

379  {
380  $study_programmes = $this->getAssignedStudyProgrammes();
381 
382  $out = array();
383  foreach($study_programmes as $study_program) {
384  $out[] = $study_program->getObjId();
385  }
386 
387  return $out;
388  }
getAssignedStudyProgrammes($include_deleted=true)
Get an array of ilObjStudyProgramme objects using this type.
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:

◆ getAssignedStudyProgrammes()

ilStudyProgrammeType::getAssignedStudyProgrammes (   $include_deleted = true)

Get an array of ilObjStudyProgramme objects using this type.

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

Definition at line 375 of file class.ilStudyProgrammeType.php.

References array, getId(), and ActiveRecord\where().

Referenced by getAssignedStudyProgrammeIds().

375  {
376  return ilStudyProgramme::where(array('subtype_id'=>$this->getId()))->get();
377  }
static where($where, $operator=null)
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:

◆ getAvailableAdvancedMDRecords()

static ilStudyProgrammeType::getAvailableAdvancedMDRecords ( )
static

Get all available AdvancedMDRecord objects for StudyProgrammes/Types.

Returns
array

Definition at line 444 of file class.ilStudyProgrammeType.php.

References $records, ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), array, ActiveRecord\count(), getAssignedStudyProgrammeIds(), getId(), ilAdvancedMDRecord\saveObjRecSelection(), and ActiveRecord\where().

Referenced by ilStudyProgrammeTypeAdvancedMetaDataFormGUI\saveObject().

444  {
445  if (is_array(self::$amd_records_available)) {
446  return self::$amd_records_available;
447  }
448  self::$amd_records_available = ilAdvancedMDRecord::_getActivatedRecordsByObjectType('prg', 'prg_type');
449 
450  return self::$amd_records_available;
451  }
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()

ilStudyProgrammeType::getCreateDate ( )
Returns
string

Definition at line 962 of file class.ilStudyProgrammeType.php.

References $create_date.

962  {
963  return $this->create_date;
964  }

◆ getDefaultLang()

ilStudyProgrammeType::getDefaultLang ( )
Returns
string

Definition at line 946 of file class.ilStudyProgrammeType.php.

References $default_lang.

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

+ Here is the caller graph for this function:

◆ getDescription()

ilStudyProgrammeType::getDescription (   $a_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.

Parameters
string$a_lang_code
Returns
null|string

Definition at line 351 of file class.ilStudyProgrammeType.php.

References getTranslation().

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

◆ getIcon()

ilStudyProgrammeType::getIcon ( )
Returns
string

Definition at line 857 of file class.ilStudyProgrammeType.php.

References $icon.

Referenced by getIconPath(), and processAndStoreIconFile().

857  {
858  return $this->icon;
859  }
+ Here is the caller graph for this function:

◆ getIconPath()

ilStudyProgrammeType::getIconPath (   $append_filename = false)

Return the path to the icon.

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

Definition at line 869 of file class.ilStudyProgrammeType.php.

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

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

869  {
870  $path = ilUtil::getWebspaceDir() . '/' . self::WEB_DATA_FOLDER . '/' . 'type_' . $this->getId() . '/';
871  if ($append_filename) {
872  $path .= $this->getIcon();
873  }
874 
875  return $path;
876  }
$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:

◆ getIconPathByStudyProgrammObjId()

static ilStudyProgrammeType::getIconPathByStudyProgrammObjId (   $obj_id)
static

Return the path to the icon by studyprogramme obj id.

Parameters
int$obj_idstudy prgramm obj id
Returns
string icon path

Definition at line 885 of file class.ilStudyProgrammeType.php.

References $default_lang, $DIC, $ilDB, $path, $res, $row, array, ActiveRecord\count(), and ilUtil\getWebspaceDir().

885  {
886  global $DIC;
887  $ilDB = $DIC['ilDB'];
888 
889  $sql = "SELECT prgt.id, prgt.icon\n"
890  ." FROM prg_type prgt\n"
891  ." JOIN prg_settings prgs\n"
892  ." ON prgt.id = prgs.subtype_id\n"
893  ." WHERE prgs.obj_id = ".$ilDB->quote($obj_id,"integer")."\n";
894 
895  $res = $ilDB->query($sql);
896 
897  if($ilDB->numRows($res) == 1) {
898  $row = $ilDB->fetchAssoc($res);
899 
900  if($row["icon"]) {
901  $path = ilUtil::getWebspaceDir() . '/' . self::WEB_DATA_FOLDER . '/' . 'type_' . $row["id"] . '/';
902  $path .= $row["icon"];
903 
904  return $path;
905  }
906 
907  return null;
908  }
909 
910  return null;
911  }
$path
Definition: aliased.php:25
global $ilDB
global $DIC
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

◆ getId()

ilStudyProgrammeType::getId ( )

◆ getLastUpdate()

ilStudyProgrammeType::getLastUpdate ( )
Returns
string

Definition at line 821 of file class.ilStudyProgrammeType.php.

References $last_update.

821  {
822  return $this->last_update;
823  }

◆ getOwner()

ilStudyProgrammeType::getOwner ( )
Returns
int

Definition at line 805 of file class.ilStudyProgrammeType.php.

References $owner.

805  {
806  return $this->owner;
807  }

◆ getTitle()

ilStudyProgrammeType::getTitle (   $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.

Parameters
string$a_lang_code
Returns
null|string

Definition at line 324 of file class.ilStudyProgrammeType.php.

References getTranslation().

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

◆ getTranslation()

ilStudyProgrammeType::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 610 of file class.ilStudyProgrammeType.php.

References $active_plugins, $lang, array, ActiveRecord\count(), getDefaultLang(), getId(), IL_COMP_MODULE, loadTranslation(), user(), and ActiveRecord\where().

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

610  {
611  $lang = ($a_lang_code) ? $a_lang_code : $this->user->getLanguage();
612 
613  $trans_obj = $this->loadTranslation($lang);
614  if (!is_null($trans_obj)) {
615  $translation = $trans_obj[$a_member];
616  // If the translation does exist but is an empty string and there was no lang code given,
617  // substitute default language anyway because an empty string provides no information
618  if (!$a_lang_code && !$translation) {
619  $trans_obj = $this->loadTranslation($this->getDefaultLang());
620 
621  return $trans_obj[$a_member];
622  }
623 
624  return $translation;
625  } else {
626  // If no lang code was given and there was no translation found, return string in default language
627  if (!$a_lang_code) {
628  $trans_obj = $this->loadTranslation($this->getDefaultLang());
629 
630  return $trans_obj[$a_member];
631  }
632 
633  return NULL;
634  }
635  }
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()

ilStudyProgrammeType::getTranslations ( )

Returns the loaded translation objects.

Returns
array

Definition at line 773 of file class.ilStudyProgrammeType.php.

References $translations, array, getId(), and ActiveRecord\where().

+ Here is the call graph for this function:

◆ loadTranslation()

ilStudyProgrammeType::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
ActiveRecordList|null

Definition at line 725 of file class.ilStudyProgrammeType.php.

References array, ActiveRecord\count(), getId(), and ActiveRecord\where().

Referenced by getTranslation().

725  {
726  if (isset($this->translations[$a_lang_code])) {
727  return $this->translations[$a_lang_code];
728  } else {
729  $trans_array = ilStudyProgrammeTypeTranslation::where(array('prg_type_id'=>$this->getId(), 'lang'=>$a_lang_code))->getArray('member', 'value');
730  if (count($trans_array)) {
731  $this->translations[$a_lang_code] = $trans_array;
732 
733  return $trans_array;
734  }
735  }
736 
737  return NULL;
738  }
static where($where, $operator=null)
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:

◆ processAndStoreIconFile()

ilStudyProgrammeType::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 566 of file class.ilStudyProgrammeType.php.

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

566  {
567  if (!$this->updateable()) {
568  return false;
569  }
570  if (!count($file_data) || !$file_data['name']) {
571  return false;
572  }
573  if (!is_dir($this->getIconPath())) {
575  }
576  $filename = $this->getIcon() ? $this->getIcon() : $file_data['name'];
577  $return = ilUtil::moveUploadedFile($file_data['tmp_name'], $filename, $this->getIconPath(true), false);
578 
579  // TODO Resize
580  return $return;
581  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
updateable()
Helper function to check if this type can be updated.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
getIconPath($append_filename=false)
Return the path to the icon.
+ Here is the call graph for this function:

◆ removeIconFile()

ilStudyProgrammeType::removeIconFile ( )

Remove the icon file on disk.

Definition at line 587 of file class.ilStudyProgrammeType.php.

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

587  {
588  if (!$this->updateable()) {
589  return;
590  }
591  if (is_file($this->getIconPath(true))) {
592  unlink($this->getIconPath(true));
593  $this->setIcon('');
594  }
595  }
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:

◆ returnDbTableName()

static ilStudyProgrammeType::returnDbTableName ( )
static
Returns
string Return the Name of your Database Table
Deprecated:

Definition at line 130 of file class.ilStudyProgrammeType.php.

130  {
131  return 'prg_type';
132  }

◆ setCreateDate()

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

Definition at line 954 of file class.ilStudyProgrammeType.php.

References $create_date.

Referenced by getAllTypesArray().

954  {
955  $this->create_date = $create_date;
956  }
+ Here is the caller graph for this function:

◆ setDescription()

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

Set description of StudyProgramme type.

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

Parameters
$a_description
string$a_lang_code

Definition at line 363 of file class.ilStudyProgrammeType.php.

References $lang, and getDefaultLang().

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

◆ setIcon()

ilStudyProgrammeType::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 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.

Parameters
string$icon
Exceptions
ilStudyProgrammeTypeException

Definition at line 846 of file class.ilStudyProgrammeType.php.

References $icon.

Referenced by removeIconFile().

846  {
847  if ($icon AND !preg_match('/\.(svg)$/', $icon)) {
848  throw new ilStudyProgrammeTypeException('Icon must be set with file extension svg');
849  }
850  $this->icon = $icon;
851  }
Exception is thrown when errors occurs relating the subtype implementation.
+ Here is the caller graph for this function:

◆ setLastUpdate()

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

Definition at line 813 of file class.ilStudyProgrammeType.php.

References $last_update.

Referenced by getAllTypesArray().

813  {
814  $this->last_update = $last_update;
815  }
+ Here is the caller graph for this function:

◆ setOwner()

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

Definition at line 797 of file class.ilStudyProgrammeType.php.

References $owner.

Referenced by getAllTypesArray().

797  {
798  $this->owner = $owner;
799  }
+ Here is the caller graph for this function:

◆ setTitle()

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

Set title of StudyProgramme type.

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

Parameters
$a_title
string$a_lang_code

Definition at line 336 of file class.ilStudyProgrammeType.php.

References $lang, and getDefaultLang().

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

◆ setTranslations()

ilStudyProgrammeType::setTranslations (   $translations)

Getters & Setters.

Parameters
array$translations

Definition at line 763 of file class.ilStudyProgrammeType.php.

References $translations.

763  {
764  $this->translations = $translations;
765  }

◆ updateable()

ilStudyProgrammeType::updateable ( )
protected

Helper function to check if this type can be updated.

Returns
bool

Definition at line 745 of file class.ilStudyProgrammeType.php.

Referenced by processAndStoreIconFile(), and removeIconFile().

745  {
746  foreach ($this->getActivePlugins() as $plugin) {
747  if (!$plugin->allowUpdate($this->getId())) {
748  return false;
749  }
750  }
751 
752  return true;
753  }
+ Here is the caller graph for this function:

Field Documentation

◆ $active_plugins

ilStudyProgrammeType::$active_plugins
protected

Definition at line 109 of file class.ilStudyProgrammeType.php.

Referenced by getTranslation().

◆ $amd_records_assigned

ilStudyProgrammeType::$amd_records_assigned
protected

Definition at line 84 of file class.ilStudyProgrammeType.php.

◆ $amd_records_available

ilStudyProgrammeType::$amd_records_available
staticprotected

Definition at line 89 of file class.ilStudyProgrammeType.php.

◆ $changed_translations

ilStudyProgrammeType::$changed_translations = array()
protected

Definition at line 123 of file class.ilStudyProgrammeType.php.

◆ $create_date

ilStudyProgrammeType::$create_date
protected

Definition at line 60 of file class.ilStudyProgrammeType.php.

Referenced by getCreateDate(), and setCreateDate().

◆ $default_lang

ilStudyProgrammeType::$default_lang = ''
protected

◆ $icon

ilStudyProgrammeType::$icon
protected

Definition at line 78 of file class.ilStudyProgrammeType.php.

Referenced by getIcon(), and setIcon().

◆ $id

ilStudyProgrammeType::$id = 0
protected

Definition at line 33 of file class.ilStudyProgrammeType.php.

Referenced by getId().

◆ $last_update

ilStudyProgrammeType::$last_update
protected

Definition at line 69 of file class.ilStudyProgrammeType.php.

Referenced by getLastUpdate(), and setLastUpdate().

◆ $lng

ilStudyProgrammeType::$lng
protected

Definition at line 114 of file class.ilStudyProgrammeType.php.

Referenced by __construct().

◆ $log

ilStudyProgrammeType::$log
protected

Definition at line 94 of file class.ilStudyProgrammeType.php.

◆ $owner

ilStudyProgrammeType::$owner
protected

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

Referenced by getOwner(), and setOwner().

◆ $pluginAdmin

ilStudyProgrammeType::$pluginAdmin
protected

Definition at line 104 of file class.ilStudyProgrammeType.php.

◆ $translations

ilStudyProgrammeType::$translations
protected

Definition at line 119 of file class.ilStudyProgrammeType.php.

Referenced by getTranslations(), and setTranslations().

◆ $user

ilStudyProgrammeType::$user
protected

Definition at line 99 of file class.ilStudyProgrammeType.php.

◆ WEB_DATA_FOLDER

const ilStudyProgrammeType::WEB_DATA_FOLDER = 'prg_data'

Folder in ILIAS webdir to store the icons.

Definition at line 21 of file class.ilStudyProgrammeType.php.


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