ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilContainer Class Reference

Class ilContainer. More...

+ Inheritance diagram for ilContainer:
+ Collaboration diagram for ilContainer:

Public Member Functions

 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 getObjectTranslation ()
 Get object translation. More...
 
 setObjectTranslation (ilObjectTranslation $obj_trans)
 Get object translation. More...
 
 createContainerDirectory ()
 Create directory for the container. More...
 
 getContainerDirectory ()
 Get the container directory. More...
 
 setHiddenFilesFound ($a_hiddenfilesfound)
 Set Found hidden files (set by getSubItems). More...
 
 getHiddenFilesFound ()
 Get Found hidden files (set by getSubItems). More...
 
 getStyleSheetId ()
 get ID of assigned style sheet object More...
 
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object More...
 
 setNewsTimeline ($a_val)
 Set news timeline. More...
 
 getNewsTimeline ()
 Get news timeline. More...
 
 setNewsTimelineAutoEntries ($a_val)
 Set news timeline auto entries. More...
 
 getNewsTimelineAutoEntries ()
 Get news timeline auto entries. More...
 
 setNewsTimelineLandingPage ($a_val)
 Set news timline is landing page. More...
 
 getNewsTimelineLandingPage ()
 Get news timline is landing page. More...
 
 isNewsTimelineEffective ()
 Is news timeline effective? More...
 
 isNewsTimelineLandingPageEffective ()
 Is news timeline landing page effective? More...
 
 setNewsBlockActivated ($a_val)
 Set news block activated. More...
 
 getNewsBlockActivated ()
 Get news block activated. More...
 
 setUseNews ($a_val)
 Set use news. More...
 
 getUseNews ()
 Get use news. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false, $a_submode=1)
 clone all objects according to this container More...
 
 delete ()
 delete category and all related data More...
 
 getViewMode ()
 Get container view mode. More...
 
 getOrderType ()
 Get order type default implementation. More...
 
 setOrderType ($a_value)
 
 getSubItems ($a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0)
 Get subitems of container. More...
 
 gotItems ()
 Check whether we got any items. More...
 
 addAdditionalSubItemInformation (&$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 enablePageEditing ()
 Check whether page editing is allowed for container. More...
 
 create ()
 Create. More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
Todo:
role/rbac stuff
Parameters
int$a_parent_refRef-ID of the parent object
More...
 
 update ()
 Update. More...
 
 read ()
 read More...
 
 readContainerSettings ()
 Read container settings. More...
 
 removeTranslations ()
 Remove all translations of container. More...
 
 deleteTranslation ($a_lang)
 Delete translation. More...
 
 addTranslation ($a_title, $a_desc, $a_lang, $a_lang_default)
 Add translation. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _getContainerDirectory ($a_id)
 Get the container directory. More...
 
static _lookupContainerSetting ($a_id, $a_keyword, $a_default_value=null)
 Lookup a container setting. More...
 
static _writeContainerSetting ($a_id, $a_keyword, $a_value)
 
static _getContainerSettings ($a_id)
 
static _deleteContainerSettings ($a_id, $a_keyword=null, $a_keyword_like=false)
 
static _exportContainerSettings (ilXmlWriter $a_xml, $a_obj_id)
 
static getCompleteDescriptions (array $objects)
 overwrites description fields to long or short description in an assoc array keys needed (obj_id and description) More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
static setDeletedDates ($a_ref_ids)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

const VIEW_SESSIONS = 0
 
const VIEW_OBJECTIVE = 1
 
const VIEW_TIMING = 2
 
const VIEW_ARCHIVE = 3
 
const VIEW_SIMPLE = 4
 
const VIEW_BY_TYPE = 5
 
const VIEW_INHERIT = 6
 
const VIEW_DEFAULT = self::VIEW_BY_TYPE
 
const SORT_TITLE = 0
 
const SORT_MANUAL = 1
 
const SORT_ACTIVATION = 2
 
const SORT_INHERIT = 3
 
const SORT_CREATION = 4
 
const SORT_DIRECTION_ASC = 0
 
const SORT_DIRECTION_DESC = 1
 
const SORT_NEW_ITEMS_POSITION_TOP = 0
 
const SORT_NEW_ITEMS_POSITION_BOTTOM = 1
 
const SORT_NEW_ITEMS_ORDER_TITLE = 0
 
const SORT_NEW_ITEMS_ORDER_CREATION = 1
 
const SORT_NEW_ITEMS_ORDER_ACTIVATION = 2
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Static Public Attributes

static $data_preloaded = false
 

Protected Attributes

 $db
 
 $log
 
 $access
 
 $error
 
 $rbacsystem
 
 $tree
 
 $user
 
 $obj_definition
 
 $order_type = 0
 
 $hiddenfilesfound = false
 
 $news_timeline = false
 
 $news_timeline_auto_entries = false
 
 $setting
 
 $obj_trans = null
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Detailed Description

Class ilContainer.

Base class for all container objects (categories, courses, groups)

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilContainer::__construct (   $a_id = 0,
  $a_reference = true 
)

Constructor @access public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

Reimplemented from ilObject.

Reimplemented in ilObjRootFolder, ilObjCategory, ilObjCourse, ilObjFolder, ilObjGroup, ilObjOrgUnit, and ilObjStudyProgramme.

Definition at line 126 of file class.ilContainer.php.

127 {
128 global $DIC;
129
130 $this->db = $DIC->database();
131 $this->log = $DIC["ilLog"];
132 $this->access = $DIC->access();
133 $this->error = $DIC["ilErr"];
134 $this->rbacsystem = $DIC->rbac()->system();
135 $this->tree = $DIC->repositoryTree();
136 $this->user = $DIC->user();
137 $this->obj_definition = $DIC["objDefinition"];
138
139
140 $this->setting = $DIC["ilSetting"];
141 parent::__construct($a_id, $a_reference);
142 include_once("./Services/Object/classes/class.ilObjectTranslation.php");
143
144 if ($this->getId() > 0) {
145 $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
146 }
147 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
static getInstance($a_obj_id)
Get instance.
getId()
get object id @access public
global $DIC
Definition: saml.php:7

References $DIC, error(), ilObject\getId(), ilObjectTranslation\getInstance(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _deleteContainerSettings()

static ilContainer::_deleteContainerSettings (   $a_id,
  $a_keyword = null,
  $a_keyword_like = false 
)
static

Definition at line 448 of file class.ilContainer.php.

449 {
450 global $DIC;
451
452 $ilDB = $DIC->database();
453
454 if (!$a_id) {
455 return;
456 }
457
458 $sql = "DELETE FROM container_settings WHERE " .
459 " id = " . $ilDB->quote($a_id, 'integer');
460 if ($a_keyword) {
461 if (!$a_keyword_like) {
462 $sql .= " AND keyword = " . $ilDB->quote($a_keyword, "text");
463 } else {
464 $sql .= " AND " . $ilDB->like("keyword", "text", $a_keyword);
465 }
466 }
467 $ilDB->manipulate($sql);
468 }
global $ilDB

References $DIC, and $ilDB.

Referenced by ilObjectTileImage\copy(), ilObjectTileImage\delete(), ilObjectCustomIconImpl\delete(), ilObjCategoryGUI\getObjectMetadataGUI(), ilObjectTileImage\persistImageState(), and ilObjCategoryGUI\updateObject().

+ Here is the caller graph for this function:

◆ _exportContainerSettings()

static ilContainer::_exportContainerSettings ( ilXmlWriter  $a_xml,
  $a_obj_id 
)
static

Definition at line 470 of file class.ilContainer.php.

471 {
472 // container settings
473 $settings = self::_getContainerSettings($a_obj_id);
474 if (sizeof($settings)) {
475 $a_xml->xmlStartTag("ContainerSettings");
476
477 foreach ($settings as $keyword => $value) {
478 // :TODO: proper custom icon export/import
479 if (stristr($keyword, "icon")) {
480 continue;
481 }
482
483 $a_xml->xmlStartTag(
484 'ContainerSetting',
485 array(
486 'id' => $keyword,
487 )
488 );
489
490 $a_xml->xmlData($value);
491 $a_xml->xmlEndTag("ContainerSetting");
492 }
493
494 $a_xml->xmlEndTag("ContainerSettings");
495 }
496 }
static _getContainerSettings($a_id)
xmlEndTag($tag)
Writes an endtag.
xmlData($data, $encode=true, $escape=true)
Writes data.
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.

References _getContainerSettings(), ilXmlWriter\xmlData(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

Referenced by ilCategoryXmlWriter\export(), ilCourseXMLWriter\start(), and ilGroupXMLWriter\start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getContainerDirectory()

static ilContainer::_getContainerDirectory (   $a_id)
static

Get the container directory.

Returns
string container directory

Definition at line 199 of file class.ilContainer.php.

200 {
201 return ilUtil::getWebspaceDir() . "/container_data/obj_" . $a_id;
202 }
static getWebspaceDir($mode="filesystem")
get webspace directory

References ilUtil\getWebspaceDir().

Referenced by getContainerDirectory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getContainerSettings()

static ilContainer::_getContainerSettings (   $a_id)
static

Definition at line 430 of file class.ilContainer.php.

431 {
432 global $DIC;
433
434 $ilDB = $DIC->database();
435
436 $res = array();
437
438 $sql = "SELECT * FROM container_settings WHERE " .
439 " id = " . $ilDB->quote($a_id, 'integer');
440 $set = $ilDB->query($sql);
441 while ($row = $ilDB->fetchAssoc($set)) {
442 $res[$row["keyword"]] = $row["value"];
443 }
444
445 return $res;
446 }
$row
foreach($_POST as $key=> $value) $res

References $DIC, $ilDB, $res, and $row.

Referenced by _exportContainerSettings(), ilObjCategoryGUI\getActiveBlocks(), and ilTaxonomyClassificationProvider\getActiveTaxonomiesForParentRefId().

+ Here is the caller graph for this function:

◆ _lookupContainerSetting()

static ilContainer::_lookupContainerSetting (   $a_id,
  $a_keyword,
  $a_default_value = null 
)
static

Lookup a container setting.

Parameters
intcontainer id
stringsetting keyword
Returns
string setting value

Definition at line 381 of file class.ilContainer.php.

382 {
383 global $DIC;
384
385 $ilDB = $DIC->database();
386
387 $q = "SELECT * FROM container_settings WHERE " .
388 " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
389 " keyword = " . $ilDB->quote($a_keyword, 'text');
390 $set = $ilDB->query($q);
391 $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
392
393 if (isset($rec['value'])) {
394 return $rec["value"];
395 }
396 if ($a_default_value === null) {
397 return '';
398 }
399 return $a_default_value;
400 }

References $DIC, $ilDB, and ilDBConstants\FETCHMODE_ASSOC.

Referenced by ilObjCategoryGUI\__construct(), ilObjContentPageGUI\__construct(), ilContSkillMemberTableGUI\__construct(), ilContainerByTypeContentGUI\__construct(), ilContainerContentGUI\__construct(), ilObjectTileImage\__construct(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilLocatorGUI\addRepositoryItems(), ilObjectCommonSettingFormAdapter\addTitleIconVisibility(), ilObjectCommonSettingFormAdapter\addTopActionsVisibility(), ilObjSession\cloneSettings(), ilContainerGUI\editPageContentObject(), ilContainerGUI\editPageFrameObject(), ilObjectTileImage\exists(), ilObjectCustomIconImpl\exists(), ilIndividualAssessmentSettingsGUI\fillForm(), ilContSkillMemberTableGUI\fillRow(), ilContainerGUI\forwardToPageObject(), ilTaxonomyClassificationProvider\getActiveTaxonomiesForParentRefId(), ilContainerGUI\getContainerPageHTML(), ilObjCategoryListGUI\getInfoScreenStatus(), ilObjContentPageListGUI\getInfoScreenStatus(), ilObjCategoryGUI\getObjectMetadataGUI(), ilTaxMDGUI\getSelectableTaxonomies(), ilObjCategoryGUI\getTabs(), ilObjCourseGUI\getTabs(), ilObjGroupGUI\getTabs(), ilObjectMetaDataGUI\hasAdvancedMDSettings(), ilObject\hasAutoRating(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilContainerGUI\initStylePropertiesForm(), ilObjectListGUI\insertCommands(), ilObjectGUI\insertHeaderAction(), ilTaggingClassificationProvider\isActive(), ilColumnGUI\isGloballyActivated(), ilBadgeHandler\isObjectActive(), ilCalendarSettings\lookupCalendarActivated(), ilContSkillAdminGUI\saveCompetenceAssignment(), ilContainerGUI\savePageContentObject(), ilObjCategoryGUI\setEditTabs(), ilObjRootFolderGUI\setTitleAndDescription(), ilContainerGUI\setTitleAndDescription(), and ilAdvancedMDRecordObjectOrderings\sortRecords().

+ Here is the caller graph for this function:

◆ _writeContainerSetting()

static ilContainer::_writeContainerSetting (   $a_id,
  $a_keyword,
  $a_value 
)
static
Parameters
$a_id
$a_keyword
$a_value

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

408 {
409 global $DIC;
410
411 $ilDB = $DIC->database();
412
413 $query = "DELETE FROM container_settings WHERE " .
414 "id = " . $ilDB->quote($a_id, 'integer') . " " .
415 "AND keyword = " . $ilDB->quote($a_keyword, 'text');
416 $res = $ilDB->manipulate($query);
417
419 $log->debug("Write container setting, id: " . $a_id . ", keyword: " . $a_keyword . ", value: " . $a_value);
420
421 $query = "INSERT INTO container_settings (id, keyword, value) VALUES (" .
422 $ilDB->quote($a_id, 'integer') . ", " .
423 $ilDB->quote($a_keyword, 'text') . ", " .
424 $ilDB->quote($a_value, 'text') .
425 ")";
426
427 $res = $ilDB->manipulate($query);
428 }
static getLogger($a_component_id)
Get component logger.
$query

References $DIC, $ilDB, $log, $query, $res, and ilLoggerFactory\getLogger().

Referenced by ilObjSession\cloneSettings(), ilObjectTileImage\copy(), ilObjectCustomIconImpl\copy(), create(), ilObjectTileImage\createFromImportDir(), ilObjCategoryGUI\getObjectMetadataGUI(), ilCategoryXmlParser\handlerEndTag(), ilCourseXMLParser\handlerEndTag(), ilGroupXMLParser\handlerEndTag(), ilContentPageDataSet\importRecord(), ilObjectDataSet\importRecord(), ilAdvancedMetaDataImporter\importXmlRepresentation(), ilObjectCustomIconImpl\persistIconState(), ilObjectTileImage\persistImageState(), putInTree(), ilObjectCustomIconImpl\remove(), ilContainerGUI\saveListPresentation(), ilContainerGUI\savePageContentObject(), ilContSkillAdminGUI\saveSettings(), ilObjectCommonSettingFormAdapter\saveTitleIconVisibility(), ilObjectCommonSettingFormAdapter\saveTopActionsVisibility(), update(), ilObjCategoryGUI\updateObject(), ilObjCourseGUI\updateObject(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), ilObjectServiceSettingsGUI\updateToolSettings(), and ilContainerGUI\useNewEditorObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addAdditionalSubItemInformation()

ilContainer::addAdditionalSubItemInformation ( $object)

Add additional information to sub item, e.g.

used in courses for timings information etc.

Reimplemented in ilObjCategory, ilObjCourse, ilObjFolder, ilObjGroup, and ilObjRootFolder.

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

861 {
862 }

Referenced by getSubItems().

+ Here is the caller graph for this function:

◆ addTranslation()

ilContainer::addTranslation (   $a_title,
  $a_desc,
  $a_lang,
  $a_lang_default 
)

Add translation.

Parameters
$a_title
$a_desc
$a_lang
$a_lang_default
Returns
bool

Reimplemented in ilObjOrgUnit, and ilObjRootFolder.

Definition at line 1145 of file class.ilContainer.php.

1146 {
1147 if (empty($a_title)) {
1148 $a_title = "NO TITLE";
1149 }
1150
1151 $this->obj_trans->addLanguage($a_lang, $a_title, $a_desc, $a_lang_default, true);
1152 $this->obj_trans->save();
1153
1154 return true;
1155 }

Referenced by create().

+ Here is the caller graph for this function:

◆ cloneAllObject()

ilContainer::cloneAllObject (   $session_id,
  $client_id,
  $new_type,
  $ref_id,
  $clone_source,
  $options,
  $soap_call = false,
  $a_submode = 1 
)

clone all objects according to this container

Parameters
string$session_id
string$client_id
string$new_type
int$ref_id
int$clone_source
array$options
boolforce soap
intsubmode 1 => copy all, 2 => copy content
Returns
new refid if clone has finished or parameter ref id if cloning is still in progress
array(copy_id => xyz, ref_id => new ref_id)

Definition at line 619 of file class.ilContainer.php.

620 {
622
623 include_once('./Services/Link/classes/class.ilLink.php');
624 include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
625
626 $ilAccess = $this->access;
631
632 // Save wizard options
634 $wizard_options = ilCopyWizardOptions::_getInstance($copy_id);
635 $wizard_options->saveOwner($ilUser->getId());
636 $wizard_options->saveRoot($clone_source);
637
638 // add entry for source container
639 $wizard_options->initContainer($clone_source, $ref_id);
640
641 foreach ($options as $source_id => $option) {
642 $wizard_options->addEntry($source_id, $option);
643 }
644 $wizard_options->read();
645 $wizard_options->storeTree($clone_source);
646
647 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
648 if ($a_submode == ilObjectCopyGUI::SUBMODE_CONTENT_ONLY) {
649 ilLoggerFactory::getLogger('obj')->info('Copy content only...');
650 ilLoggerFactory::getLogger('obj')->debug('Added mapping, source ID: ' . $clone_source . ', target ID: ' . $ref_id);
651 $wizard_options->read();
652 $wizard_options->dropFirstNode();
653 $wizard_options->appendMapping($clone_source, $ref_id);
654 }
655
656
657 #print_r($options);
658 // Duplicate session to avoid logout problems with backgrounded SOAP calls
659 $new_session_id = ilSession::_duplicate($session_id);
660 // Start cloning process using soap call
661 include_once 'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
662
663 $soap_client = new ilSoapClient();
664 $soap_client->setResponseTimeout(5);
665 $soap_client->enableWSDL(true);
666
667 $ilLog->write(__METHOD__ . ': Trying to call Soap client...');
668 if ($soap_client->init()) {
669 ilLoggerFactory::getLogger('obj')->info('Calling soap clone method');
670 $res = $soap_client->call('ilClone', array($new_session_id . '::' . $client_id, $copy_id));
671 } else {
672 ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
673 $wizard_options->disableSOAP();
674 $wizard_options->read();
675 include_once('./webservice/soap/include/inc.soap_functions.php');
676 $res = ilSoapFunctions::ilClone($new_session_id . '::' . $client_id, $copy_id);
677 }
678 return array(
679 'copy_id' => $copy_id,
680 'ref_id' => (int) $res
681 );
682 }
static _allocateCopyId()
Allocate a copy for further entries.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
static _duplicate($a_session_id)
Duplicate session.
static ilClone($sid, $copy_identifier)
$client_id
$ilErr
Definition: raiseError.php:18
$ilUser
Definition: imgupload.php:18

References $access, $client_id, $error, $ilErr, $ilLog, $ilUser, $log, PHPMailer\PHPMailer\$options, $rbacsystem, ilObject\$ref_id, $res, $tree, $user, ilCopyWizardOptions\_allocateCopyId(), ilSession\_duplicate(), ilCopyWizardOptions\_getInstance(), ilLoggerFactory\getLogger(), ilSoapFunctions\ilClone(), and ilObjectCopyGUI\SUBMODE_CONTENT_ONLY.

+ Here is the call graph for this function:

◆ cloneDependencies()

ilContainer::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone object dependencies (container sorting)

@access public

Parameters
inttarget ref id of new course
intcopy id return bool

Reimplemented from ilObject.

Reimplemented in ilObjCategory, ilObjCourse, ilObjFolder, and ilObjGroup.

Definition at line 579 of file class.ilContainer.php.

580 {
582
583 parent::cloneDependencies($a_target_id, $a_copy_id);
584
585 include_once('./Services/Container/classes/class.ilContainerSorting.php');
586 ilContainerSorting::_getInstance($this->getId())->cloneSorting($a_target_id, $a_copy_id);
587
588 // fix internal links to other objects
589 ilContainer::fixInternalLinksAfterCopy($a_target_id, $a_copy_id, $this->getRefId());
590
591 // fix item group references in page content
592 include_once("./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
594
595 include_once('Services/Object/classes/class.ilObjectLP.php');
596 $olp = ilObjectLP::getInstance($this->getId());
597 $collection = $olp->getCollectionInstance();
598 if ($collection) {
599 $collection->cloneCollection($a_target_id, $a_copy_id);
600 }
601
602 return true;
603 }
static _getInstance($a_obj_id)
get instance by obj_id
static fixContainerItemGroupRefsAfterCloning($a_source_container, $a_copy_id)
Fix container item group references after a container has been cloned.
static getInstance($a_obj_id)
getRefId()
get reference id @access public

References $ilLog, $log, ilContainerSorting\_getInstance(), ilObjItemGroup\fixContainerItemGroupRefsAfterCloning(), ilObject\getId(), ilObjectLP\getInstance(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ create()

ilContainer::create ( )

Create.

Reimplemented from ilObject.

Reimplemented in ilObjGroup, ilObjLearningSequence, ilObjOrgUnit, and ilObjStudyProgramme.

Definition at line 895 of file class.ilContainer.php.

896 {
897 global $DIC;
898
899 $lng = $DIC->language();
900
901 $ret = parent::create();
902
903 // set translation object, since we have an object id now
904 $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
905
906 // add default translation
907 $this->addTranslation(
908 $this->getTitle(),
909 $this->getDescription(),
910 $lng->getDefaultLanguage(),
911 true
912 );
913
914 if (((int) $this->getStyleSheetId()) > 0) {
915 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
917 }
918
920 $log->debug("Create Container, id: " . $this->getId());
921
922 self::_writeContainerSetting($this->getId(), "news_timeline", (int) $this->getNewsTimeline());
923 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (int) $this->getNewsTimelineAutoEntries());
924 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (int) $this->getNewsTimelineLandingPage());
925 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
928
929 return $ret;
930 }
getNewsTimeline()
Get news timeline.
getStyleSheetId()
get ID of assigned style sheet object
getNewsTimelineLandingPage()
Get news timline is landing page.
addTranslation($a_title, $a_desc, $a_lang, $a_lang_default)
Add translation.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
getNewsBlockActivated()
Get news block activated.
getNewsTimelineAutoEntries()
Get news timeline auto entries.
getUseNews()
Get use news.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
getDescription()
get object description
getTitle()
get object title @access public
$ret
Definition: parser.php:6

References $DIC, ilObject\$lng, $log, $ret, _writeContainerSetting(), addTranslation(), ilObject\getDescription(), ilObject\getId(), ilObjectTranslation\getInstance(), ilLoggerFactory\getLogger(), getNewsBlockActivated(), getNewsTimeline(), getNewsTimelineAutoEntries(), getNewsTimelineLandingPage(), getStyleSheetId(), ilObject\getTitle(), getUseNews(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilObjectServiceSettingsGUI\USE_NEWS, and ilObjStyleSheet\writeStyleUsage().

+ Here is the call graph for this function:

◆ createContainerDirectory()

ilContainer::createContainerDirectory ( )

Create directory for the container.

It is <webspace_dir>/container_data.

Definition at line 171 of file class.ilContainer.php.

172 {
173 $webspace_dir = ilUtil::getWebspaceDir();
174 $cont_dir = $webspace_dir . "/container_data";
175 if (!is_dir($cont_dir)) {
176 ilUtil::makeDir($cont_dir);
177 }
178 $obj_dir = $cont_dir . "/obj_" . $this->getId();
179 if (!is_dir($obj_dir)) {
180 ilUtil::makeDir($obj_dir);
181 }
182 }
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...

References ilObject\getId(), ilUtil\getWebspaceDir(), and ilUtil\makeDir().

+ Here is the call graph for this function:

◆ delete()

ilContainer::delete ( )

delete category and all related data

Returns
boolean true if all object data were removed; false if only a references were removed

Reimplemented in ilObjCategory, ilObjCourse, ilObjGroup, ilObjLearningSequence, ilObjOrgUnit, ilObjRootFolder, and ilObjStudyProgramme.

Definition at line 689 of file class.ilContainer.php.

690 {
691 // always call parent delete function first!!
692 if (!parent::delete()) {
693 return false;
694 }
695 // delete translations
696 $this->obj_trans->delete();
697
698 return true;
699 }

◆ deleteTranslation()

ilContainer::deleteTranslation (   $a_lang)

Delete translation.

Parameters
$a_lang

Reimplemented in ilObjOrgUnit, and ilObjRootFolder.

Definition at line 1130 of file class.ilContainer.php.

1131 {
1132 $this->obj_trans->removeLanguage($a_lang);
1133 $this->obj_trans->save();
1134 }

◆ enablePageEditing()

ilContainer::enablePageEditing ( )

Check whether page editing is allowed for container.

Definition at line 882 of file class.ilContainer.php.

883 {
885
886 // @todo: this will need a more general approach
887 if ($ilSetting->get("enable_cat_page_edit")) {
888 return true;
889 }
890 }
global $ilSetting
Definition: privfeed.php:17

References $ilSetting, and $setting.

◆ getCompleteDescriptions()

static ilContainer::getCompleteDescriptions ( array  $objects)
static

overwrites description fields to long or short description in an assoc array keys needed (obj_id and description)

Parameters
array$objects
Returns
array

Definition at line 1026 of file class.ilContainer.php.

1027 {
1028 global $DIC;
1029
1030 $ilSetting = $DIC->settings();
1031 $ilObjDataCache = $DIC["ilObjDataCache"];
1032 // using long descriptions?
1033 $short_desc = $ilSetting->get("rep_shorten_description");
1034 $short_desc_max_length = $ilSetting->get("rep_shorten_description_length");
1035 if (!$short_desc || $short_desc_max_length != ilObject::DESC_LENGTH) {
1036 // using (part of) shortened description
1037 if ($short_desc && $short_desc_max_length && $short_desc_max_length < ilObject::DESC_LENGTH) {
1038 foreach ($objects as $key => $object) {
1039 $objects[$key]["description"] = ilUtil::shortenText($object["description"], $short_desc_max_length, true);
1040 }
1041 }
1042 // using (part of) long description
1043 else {
1044 $obj_ids = array();
1045 foreach ($objects as $key => $object) {
1046 $obj_ids[] = $object["obj_id"];
1047 }
1048 if (sizeof($obj_ids)) {
1050 foreach ($objects as $key => $object) {
1051 // #12166 - keep translation, ignore long description
1052 if ($ilObjDataCache->isTranslatedDescription($object["obj_id"])) {
1053 $long_desc[$object["obj_id"]] = $object["description"];
1054 }
1055 if ($short_desc && $short_desc_max_length) {
1056 $long_desc[$object["obj_id"]] = ilUtil::shortenText($long_desc[$object["obj_id"]], $short_desc_max_length, true);
1057 }
1058 $objects[$key]["description"] = $long_desc[$object["obj_id"]];
1059 }
1060 }
1061 }
1062 }
1063 return $objects;
1064 }
const DESC_LENGTH
static getLongDescriptions(array $a_obj_ids)
Get long description data.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
$key
Definition: croninfo.php:18

References $DIC, $ilSetting, $key, ilObject\$long_desc, ilObject\DESC_LENGTH, ilObject\getLongDescriptions(), and ilUtil\shortenText().

Referenced by getSubItems(), ilContainerContentGUI\renderItem(), and ilContainerContentGUI\renderItemGroup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContainerDirectory()

ilContainer::getContainerDirectory ( )

Get the container directory.

Returns
string container directory

Definition at line 189 of file class.ilContainer.php.

190 {
191 return $this->_getContainerDirectory($this->getId());
192 }
static _getContainerDirectory($a_id)
Get the container directory.

References _getContainerDirectory(), and ilObject\getId().

+ Here is the call graph for this function:

◆ getGroupedObjTypes()

ilContainer::getGroupedObjTypes ( )

Get grouped repository object types.

Returns
array array of object types

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

870 {
872
873 if (empty($this->type_grps)) {
874 $this->type_grps = $objDefinition->getGroupedRepositoryObjectTypes($this->getType());
875 }
876 return $this->type_grps;
877 }
getType()
get object type @access public

References $obj_definition, ilObject\$objDefinition, and ilObject\getType().

Referenced by getSubItems().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHiddenFilesFound()

ilContainer::getHiddenFilesFound ( )

Get Found hidden files (set by getSubItems).

Returns
boolean Found hidden files (set by getSubItems)

Definition at line 219 of file class.ilContainer.php.

220 {
222 }

References $hiddenfilesfound.

◆ getNewsBlockActivated()

ilContainer::getNewsBlockActivated ( )

Get news block activated.

Returns
bool news block activated

Definition at line 348 of file class.ilContainer.php.

349 {
350 return $this->news_block_activated;
351 }

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getNewsTimeline()

ilContainer::getNewsTimeline ( )

Get news timeline.

Returns
bool activate news timeline

Definition at line 255 of file class.ilContainer.php.

256 {
258 }

References $news_timeline.

Referenced by create(), isNewsTimelineEffective(), isNewsTimelineLandingPageEffective(), and update().

+ Here is the caller graph for this function:

◆ getNewsTimelineAutoEntries()

ilContainer::getNewsTimelineAutoEntries ( )

Get news timeline auto entries.

Returns
bool include automatically created entries

Definition at line 275 of file class.ilContainer.php.

276 {
278 }

References $news_timeline_auto_entries.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getNewsTimelineLandingPage()

ilContainer::getNewsTimelineLandingPage ( )

Get news timline is landing page.

Returns
bool is news timline landing page?

Definition at line 295 of file class.ilContainer.php.

296 {
297 return $this->news_timeline_landing_page;
298 }

Referenced by create(), isNewsTimelineLandingPageEffective(), and update().

+ Here is the caller graph for this function:

◆ getObjectTranslation()

ilContainer::getObjectTranslation ( )

Get object translation.

Returns
ilObjectTranslation

Definition at line 153 of file class.ilContainer.php.

154 {
155 return $this->obj_trans;
156 }

References $obj_trans.

Referenced by update().

+ Here is the caller graph for this function:

◆ getOrderType()

ilContainer::getOrderType ( )

Get order type default implementation.

Reimplemented in ilObjCourse.

Definition at line 712 of file class.ilContainer.php.

713 {
714 return $this->order_type ? $this->order_type : ilContainer::SORT_TITLE;
715 }

References SORT_TITLE.

◆ getStyleSheetId()

ilContainer::getStyleSheetId ( )

get ID of assigned style sheet object

Definition at line 227 of file class.ilContainer.php.

228 {
229 return $this->style_id;
230 }

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getSubItems()

ilContainer::getSubItems (   $a_admin_panel_enabled = false,
  $a_include_side_block = false,
  $a_get_single = 0 
)

Get subitems of container.

Parameters
booladministration panel enabled
boolside blocks enabled
Returns
array

Reimplemented in ilObjCourse.

Definition at line 730 of file class.ilContainer.php.

731 {
734
735 // Caching
736 if (is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
737 !$a_get_single) {
738 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
739 }
740
741 $type_grps = $this->getGroupedObjTypes();
742 $objects = $tree->getChilds($this->getRefId(), "title");
743
744 $objects = self::getCompleteDescriptions($objects);
745
746 $found = false;
747 $all_ref_ids = array();
748
749 if (!self::$data_preloaded) {
750 include_once("./Services/Object/classes/class.ilObjectListGUIPreloader.php");
752 }
753
754 include_once('Services/Container/classes/class.ilContainerSorting.php');
755 $sort = ilContainerSorting::_getInstance($this->getId());
756
757 // TODO: check this
758 // get items attached to a session
759 include_once './Modules/Session/classes/class.ilEventItems.php';
760 $event_items = ilEventItems::_getItemsOfContainer($this->getRefId());
761
762 foreach ($objects as $key => $object) {
763 if ($a_get_single > 0 && $object["child"] != $a_get_single) {
764 continue;
765 }
766
767 // hide object types in devmode
768 if ($objDefinition->getDevMode($object["type"]) || $object["type"] == "adm"
769 || $object["type"] == "rolf") {
770 continue;
771 }
772
773 // remove inactive plugins
774 if ($objDefinition->isInactivePlugin($object["type"])) {
775 continue;
776 }
777
778 // BEGIN WebDAV: Don't display hidden Files, Folders and Categories
779 if (in_array($object['type'], array('file','fold','cat'))) {
780 include_once 'Modules/File/classes/class.ilObjFileAccess.php';
781 if (ilObjFileAccess::_isFileHidden($object['title'])) {
782 $this->setHiddenFilesFound(true);
783 if (!$a_admin_panel_enabled) {
784 continue;
785 }
786 }
787 }
788 // END WebDAV: Don't display hidden Files, Folders and Categories
789
790 // including event items!
791 if (!self::$data_preloaded) {
792 $preloader->addItem($object["obj_id"], $object["type"], $object["child"]);
793 }
794
795 // filter out items that are attached to an event
796 if (in_array($object['ref_id'], $event_items)) {
797 continue;
798 }
799
800 // filter side block items
801 if (!$a_include_side_block && $objDefinition->isSideBlock($object['type'])) {
802 continue;
803 }
804
805 $all_ref_ids[] = $object["child"];
806 }
807
808 // data preloader
809 if (!self::$data_preloaded) {
810 $preloader->preload();
811 unset($preloader);
812
813 self::$data_preloaded = true;
814 }
815
816 foreach ($objects as $key => $object) {
817 // see above, objects were filtered
818 if (!in_array($object["child"], $all_ref_ids)) {
819 continue;
820 }
821
822 // group object type groups together (e.g. learning resources)
823 $type = $objDefinition->getGroupOfObj($object["type"]);
824 if ($type == "") {
825 $type = $object["type"];
826 }
827
828 // this will add activation properties
829 $this->addAdditionalSubItemInformation($object);
830
831 $this->items[$type][$key] = $object;
832
833 $this->items["_all"][$key] = $object;
834 if ($object["type"] != "sess") {
835 $this->items["_non_sess"][$key] = $object;
836 }
837 }
838
839 $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]
840 = $sort->sortItems($this->items);
841
842 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
843 }
getGroupedObjTypes()
Get grouped repository object types.
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
setHiddenFilesFound($a_hiddenfilesfound)
Set Found hidden files (set by getSubItems).
addAdditionalSubItemInformation(&$object)
Add additional information to sub item, e.g.
static _getItemsOfContainer($a_ref_id)
static _isFileHidden($a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user.
Preloader for object list GUIs.

References $key, $obj_definition, ilObject\$objDefinition, $tree, ilObject\$type, ilContainerSorting\_getInstance(), ilEventItems\_getItemsOfContainer(), ilObjFileAccess\_isFileHidden(), addAdditionalSubItemInformation(), ilObjectListGUI\CONTEXT_REPOSITORY, getCompleteDescriptions(), getGroupedObjTypes(), ilObject\getId(), ilObject\getRefId(), and setHiddenFilesFound().

+ Here is the call graph for this function:

◆ getUseNews()

ilContainer::getUseNews ( )

Get use news.

Returns
bool use news system?

Definition at line 368 of file class.ilContainer.php.

369 {
370 return $this->use_news;
371 }

Referenced by create(), isNewsTimelineEffective(), isNewsTimelineLandingPageEffective(), and update().

+ Here is the caller graph for this function:

◆ getViewMode()

ilContainer::getViewMode ( )

Get container view mode.

Reimplemented in ilObjCourse, ilObjFolder, and ilObjGroup.

Definition at line 704 of file class.ilContainer.php.

705 {
707 }

References VIEW_BY_TYPE.

◆ gotItems()

ilContainer::gotItems ( )

Check whether we got any items.

Definition at line 848 of file class.ilContainer.php.

849 {
850 if (is_array($this->items["_all"]) && count($this->items["_all"]) > 0) {
851 return true;
852 }
853 return false;
854 }

◆ isNewsTimelineEffective()

ilContainer::isNewsTimelineEffective ( )

Is news timeline effective?

Returns
bool

Definition at line 305 of file class.ilContainer.php.

306 {
307 if ($this->getUseNews()) {
308 if ($this->getNewsTimeline()) {
309 return true;
310 }
311 }
312 return false;
313 }

References getNewsTimeline(), and getUseNews().

+ Here is the call graph for this function:

◆ isNewsTimelineLandingPageEffective()

ilContainer::isNewsTimelineLandingPageEffective ( )

Is news timeline landing page effective?

Returns
bool

Definition at line 320 of file class.ilContainer.php.

321 {
322 if ($this->getUseNews()) {
323 if ($this->getNewsTimeline()) {
324 if ($this->getNewsTimelineLandingPage()) {
325 return true;
326 }
327 }
328 }
329 return false;
330 }

References getNewsTimeline(), getNewsTimelineLandingPage(), and getUseNews().

+ Here is the call graph for this function:

◆ putInTree()

ilContainer::putInTree (   $a_parent_ref)

maybe this method should be in tree object!?

Todo:
role/rbac stuff
Parameters
int$a_parent_refRef-ID of the parent object

Reimplemented from ilObject.

Reimplemented in ilObjFolder, and ilObjStudyProgramme.

Definition at line 935 of file class.ilContainer.php.

936 {
937 parent::putInTree($a_parent_ref);
938
939 // copy title, icon actions visibilities
940 if (self::_lookupContainerSetting(ilObject::_lookupObjId($a_parent_ref), "hide_header_icon_and_title")) {
941 self::_writeContainerSetting($this->getId(), "hide_header_icon_and_title", true);
942 }
943 if (self::_lookupContainerSetting(ilObject::_lookupObjId($a_parent_ref), "hide_top_actions")) {
944 self::_writeContainerSetting($this->getId(), "hide_top_actions", true);
945 }
946 }
static _lookupObjId($a_id)

References ilObject\_lookupObjId(), _writeContainerSetting(), and ilObject\getId().

+ Here is the call graph for this function:

◆ read()

ilContainer::read ( )

read

@access public

Parameters

return

Reimplemented from ilObject.

Reimplemented in ilObjCourse, ilObjFolder, ilObjGroup, ilObjLearningSequence, and ilObjStudyProgramme.

Definition at line 984 of file class.ilContainer.php.

985 {
986 parent::read();
987
988 include_once("./Services/Container/classes/class.ilContainerSortingSettings.php");
990
991 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
993
994 $this->readContainerSettings();
995 $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
996 }
static _lookupSortMode($a_obj_id)
lookup sort mode
setOrderType($a_value)
setStyleSheetId($a_style_id)
set ID of assigned style sheet object
readContainerSettings()
Read container settings.
static lookupObjectStyle($a_obj_id)
Lookup object style.

References ilContainerSortingSettings\_lookupSortMode(), ilObject\getId(), ilObjectTranslation\getInstance(), ilObjStyleSheet\lookupObjectStyle(), readContainerSettings(), setOrderType(), and setStyleSheetId().

+ Here is the call graph for this function:

◆ readContainerSettings()

ilContainer::readContainerSettings ( )

Read container settings.

Parameters

return

Definition at line 1004 of file class.ilContainer.php.

1005 {
1006 $this->setNewsTimeline(self::_lookupContainerSetting($this->getId(), "news_timeline"));
1007 $this->setNewsTimelineAutoEntries(self::_lookupContainerSetting($this->getId(), "news_timeline_incl_auto"));
1008 $this->setNewsTimelineLandingPage(self::_lookupContainerSetting($this->getId(), "news_timeline_landing_page"));
1009 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
1010 $this->setNewsBlockActivated(self::_lookupContainerSetting(
1011 $this->getId(),
1013 $this->setting->get('block_activated_news', true)
1014 ));
1015 $this->setUseNews(self::_lookupContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, true));
1016 }
setNewsTimeline($a_val)
Set news timeline.
setNewsTimelineLandingPage($a_val)
Set news timline is landing page.
setNewsBlockActivated($a_val)
Set news block activated.
setUseNews($a_val)
Set use news.
setNewsTimelineAutoEntries($a_val)
Set news timeline auto entries.

References ilObject\getId(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, setNewsBlockActivated(), setNewsTimeline(), setNewsTimelineAutoEntries(), setNewsTimelineLandingPage(), setUseNews(), and ilObjectServiceSettingsGUI\USE_NEWS.

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeTranslations()

ilContainer::removeTranslations ( )

Remove all translations of container.

Reimplemented in ilObjOrgUnit, and ilObjRootFolder.

Definition at line 1120 of file class.ilContainer.php.

1121 {
1122 $this->obj_trans->delete();
1123 }

◆ setHiddenFilesFound()

ilContainer::setHiddenFilesFound (   $a_hiddenfilesfound)

Set Found hidden files (set by getSubItems).

Parameters
boolean$a_hiddenfilesfoundFound hidden files (set by getSubItems)

Definition at line 209 of file class.ilContainer.php.

210 {
211 $this->hiddenfilesfound = $a_hiddenfilesfound;
212 }

Referenced by getSubItems().

+ Here is the caller graph for this function:

◆ setNewsBlockActivated()

ilContainer::setNewsBlockActivated (   $a_val)

Set news block activated.

Parameters
bool$a_valnews block activated

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

339 {
340 $this->news_block_activated = $a_val;
341 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ setNewsTimeline()

ilContainer::setNewsTimeline (   $a_val)

Set news timeline.

Parameters
bool$a_valactivate news timeline

Definition at line 245 of file class.ilContainer.php.

246 {
247 $this->news_timeline = $a_val;
248 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ setNewsTimelineAutoEntries()

ilContainer::setNewsTimelineAutoEntries (   $a_val)

Set news timeline auto entries.

Parameters
bool$a_valinclude automatically created entries

Definition at line 265 of file class.ilContainer.php.

266 {
267 $this->news_timeline_auto_entries = $a_val;
268 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ setNewsTimelineLandingPage()

ilContainer::setNewsTimelineLandingPage (   $a_val)

Set news timline is landing page.

Parameters
bool$a_valis news timline landing page?

Definition at line 285 of file class.ilContainer.php.

286 {
287 $this->news_timeline_landing_page = $a_val;
288 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ setObjectTranslation()

ilContainer::setObjectTranslation ( ilObjectTranslation  $obj_trans)

Get object translation.

Parameters
ilObjectTranslation$obj_trans

Definition at line 162 of file class.ilContainer.php.

163 {
164 $this->obj_trans = $obj_trans;
165 }

References $obj_trans.

◆ setOrderType()

ilContainer::setOrderType (   $a_value)

Definition at line 717 of file class.ilContainer.php.

718 {
719 $this->order_type = $a_value;
720 }

Referenced by ilObjCourse\read(), ilObjFolder\read(), ilObjGroup\read(), and read().

+ Here is the caller graph for this function:

◆ setStyleSheetId()

ilContainer::setStyleSheetId (   $a_style_id)

set ID of assigned style sheet object

Definition at line 235 of file class.ilContainer.php.

236 {
237 $this->style_id = $a_style_id;
238 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setUseNews()

ilContainer::setUseNews (   $a_val)

Set use news.

Parameters
bool$a_valuse news system?

Definition at line 358 of file class.ilContainer.php.

359 {
360 $this->use_news = $a_val;
361 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ update()

ilContainer::update ( )

Update.

Reimplemented from ilObject.

Reimplemented in ilObjCourse, ilObjGroup, ilObjLearningSequence, ilObjOrgUnit, and ilObjStudyProgramme.

Definition at line 951 of file class.ilContainer.php.

952 {
954
955 $trans = $this->getObjectTranslation();
956 $trans->setDefaultTitle($this->getTitle());
957 $trans->setDefaultDescription($this->getLongDescription());
958 $trans->save();
959
960 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
962
964 $log->debug("Update Container, id: " . $this->getId());
965
966 self::_writeContainerSetting($this->getId(), "news_timeline", (int) $this->getNewsTimeline());
967 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (int) $this->getNewsTimelineAutoEntries());
968 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (int) $this->getNewsTimelineLandingPage());
969 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
972
973 return $ret;
974 }
getObjectTranslation()
Get object translation.
getLongDescription()
get object long description (stored in object_description)
update($pash, $contents, Config $config)

References $log, $ret, _writeContainerSetting(), ilObject\getId(), ilLoggerFactory\getLogger(), ilObject\getLongDescription(), getNewsBlockActivated(), getNewsTimeline(), getNewsTimelineAutoEntries(), getNewsTimelineLandingPage(), getObjectTranslation(), getStyleSheetId(), ilObject\getTitle(), getUseNews(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, League\Flysystem\Adapter\Polyfill\update(), ilObjectServiceSettingsGUI\USE_NEWS, and ilObjStyleSheet\writeStyleUsage().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilContainer::$access
protected

◆ $data_preloaded

ilContainer::$data_preloaded = false
static

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

◆ $db

◆ $error

ilContainer::$error
protected

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

Referenced by cloneAllObject(), and ilObjCourse\validateInfoSettings().

◆ $hiddenfilesfound

ilContainer::$hiddenfilesfound = false
protected

Definition at line 82 of file class.ilContainer.php.

Referenced by getHiddenFilesFound().

◆ $log

ilContainer::$log
protected

◆ $news_timeline

ilContainer::$news_timeline = false
protected

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

Referenced by getNewsTimeline().

◆ $news_timeline_auto_entries

ilContainer::$news_timeline_auto_entries = false
protected

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

Referenced by getNewsTimelineAutoEntries().

◆ $obj_definition

ilObjectDefinition ilContainer::$obj_definition
protected

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

Referenced by getGroupedObjTypes(), and getSubItems().

◆ $obj_trans

ilContainer::$obj_trans = null
protected

Definition at line 124 of file class.ilContainer.php.

Referenced by getObjectTranslation(), and setObjectTranslation().

◆ $order_type

ilContainer::$order_type = 0
protected

Definition at line 81 of file class.ilContainer.php.

◆ $rbacsystem

ilContainer::$rbacsystem
protected

◆ $setting

ilContainer::$setting
protected

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

Referenced by enablePageEditing().

◆ $tree

◆ $user

ilContainer::$user
protected

Definition at line 74 of file class.ilContainer.php.

Referenced by cloneAllObject().

◆ SORT_ACTIVATION

◆ SORT_CREATION

◆ SORT_DIRECTION_ASC

◆ SORT_DIRECTION_DESC

const ilContainer::SORT_DIRECTION_DESC = 1

◆ SORT_INHERIT

◆ SORT_MANUAL

◆ SORT_NEW_ITEMS_ORDER_ACTIVATION

◆ SORT_NEW_ITEMS_ORDER_CREATION

◆ SORT_NEW_ITEMS_ORDER_TITLE

◆ SORT_NEW_ITEMS_POSITION_BOTTOM

◆ SORT_NEW_ITEMS_POSITION_TOP

◆ SORT_TITLE

◆ VIEW_ARCHIVE

const ilContainer::VIEW_ARCHIVE = 3

Definition at line 90 of file class.ilContainer.php.

◆ VIEW_BY_TYPE

◆ VIEW_DEFAULT

const ilContainer::VIEW_DEFAULT = self::VIEW_BY_TYPE

Definition at line 95 of file class.ilContainer.php.

Referenced by ilObjGroup\getViewMode(), and ilObjGroup\translateViewMode().

◆ VIEW_INHERIT

const ilContainer::VIEW_INHERIT = 6

◆ VIEW_OBJECTIVE

◆ VIEW_SESSIONS

◆ VIEW_SIMPLE

◆ VIEW_TIMING


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