ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilContainer Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 getTileSizes ()
 
 getObjectTranslation ()
 
 setObjectTranslation (?ilObjectTranslation $obj_trans)
 
 createContainerDirectory ()
 
 getContainerDirectory ()
 
 setHiddenFilesFound (bool $a_hiddenfilesfound)
 
 getHiddenFilesFound ()
 
 getStyleSheetId ()
 
 setStyleSheetId (int $a_style_id)
 
 setNewsTimeline (bool $a_val)
 
 getNewsTimeline ()
 
 setNewsTimelineAutoEntries (bool $a_val)
 
 getNewsTimelineAutoEntries ()
 
 setNewsTimelineLandingPage (bool $a_val)
 
 getNewsTimelineLandingPage ()
 
 isNewsTimelineEffective ()
 
 isNewsTimelineLandingPageEffective ()
 
 setNewsBlockActivated (bool $a_val)
 
 getNewsBlockActivated ()
 
 setUseNews (bool $a_val)
 
 getUseNews ()
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject (string $session_id, string $client_id, string $new_type, int $ref_id, int $clone_source, array $options, bool $soap_call=false, int $a_submode=1)
 
 delete ()
 delete category and all related data More...
 
 getViewMode ()
 
 getOrderType ()
 
 setOrderType (int $a_value)
 
 isClassificationFilterActive ()
 
 filteredSubtree ()
 Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs. More...
 
 getSubItems (bool $a_admin_panel_enabled=false, bool $a_include_side_block=false, int $a_get_single=0, ?ilContainerUserFilter $container_user_filter=null)
 
 gotItems ()
 
 addAdditionalSubItemInformation (array &$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 
 enablePageEditing ()
 
 create ()
 
 putInTree (int $parent_ref_id)
 
 update ()
 
 read ()
 
 readContainerSettings ()
 
 removeTranslations ()
 
 deleteTranslation (string $a_lang)
 
 addTranslation (string $a_title, string $a_desc, string $a_lang, string $a_lang_default)
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! 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. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static _getContainerDirectory (int $a_id)
 
static _lookupContainerSetting (int $a_id, string $a_keyword, ?string $a_default_value=null)
 
static _hasContainerSetting (int $a_id, string $a_keyword)
 
static _writeContainerSetting (int $a_id, string $a_keyword, string $a_value)
 
static _getContainerSettings (int $a_id)
 
static _deleteContainerSettings (int $a_id, string $a_keyword="", bool $a_keyword_like=false)
 
static _exportContainerSettings (ilXmlWriter $a_xml, int $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 (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", ?int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static getIconForType (string $type)
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null)
 

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
 
const TILE_NORMAL = 0
 
const TILE_SMALL = 1
 
const TILE_LARGE = 2
 
const TILE_EXTRA_LARGE = 3
 
const TILE_FULL = 4
 
array $items = []
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Static Public Attributes

static bool $data_preloaded = false
 

Protected Member Functions

 getInitialSubitems ()
 
 applyContainerUserFilter (array $objects, ?ilContainerUserFilter $container_user_filter=null)
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Protected Attributes

News $news
 
ILIAS Style Content DomainService $content_style_domain
 
ILIAS Container InternalDomainService $domain
 
ilAccessHandler $access
 
ilRbacSystem $rbacsystem
 
ilObjUser $user
 
ilObjectDefinition $obj_definition
 
int $order_type = 0
 
bool $hiddenfilesfound = false
 
bool $news_timeline = false
 
bool $news_timeline_auto_entries = false
 
ilSetting $setting
 
ilObjectTranslation $obj_trans = null
 
int $style_id = 0
 
bool $news_timeline_landing_page = false
 
bool $news_block_activated = false
 
bool $use_news = false
 
ilRecommendedContentManager $recommended_content_manager
 
array $type_grps = null
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
LOMServices $lom_services
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilContainer

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

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ _deleteContainerSettings()

static ilContainer::_deleteContainerSettings ( int  $a_id,
string  $a_keyword = "",
bool  $a_keyword_like = false 
)
static

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

References $DIC, and $ilDB.

Referenced by ilObjectCustomIcon\delete(), ILIAS\Object\Properties\CoreProperties\TileImage\ilObjectTileImage\deleteLegacyTileImage(), ilObjCategoryGUI\hideTaxAsSideBlockObject(), and ilObjCategoryGUI\updateObject().

345  : void {
346  global $DIC;
347 
348  $ilDB = $DIC->database();
349 
350  if (!$a_id) {
351  return;
352  }
353 
354  $sql = "DELETE FROM container_settings WHERE " .
355  " id = " . $ilDB->quote($a_id, 'integer');
356  if ($a_keyword !== "") {
357  if (!$a_keyword_like) {
358  $sql .= " AND keyword = " . $ilDB->quote($a_keyword, "text");
359  } else {
360  $sql .= " AND " . $ilDB->like("keyword", "text", $a_keyword);
361  }
362  }
363  $ilDB->manipulate($sql);
364  }
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

◆ _exportContainerSettings()

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

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

References ilObject\$log, ilContainerSortingSettings\_cloneSettings(), ilPageObject\_exists(), ilBlockSetting\cloneSettingsOfBlock(), ilLogger\debug(), ilObject\getId(), ilObjectTranslation\getInstance(), ilLoggerFactory\getLogger(), getNewsBlockActivated(), getNewsTimeline(), getNewsTimelineAutoEntries(), getNewsTimelineLandingPage(), ilObject\getRefId(), getUseNews(), ilXmlWriter\xmlData(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

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

369  : void {
370  // container settings
371  $settings = self::_getContainerSettings($a_obj_id);
372  if (count($settings)) {
373  $a_xml->xmlStartTag("ContainerSettings");
374 
375  foreach ($settings as $keyword => $value) {
376  // :TODO: proper custom icon export/import
377  if (
378  stripos($keyword, "icon") !== false
379  && $keyword !== 'hide_header_icon_and_title'
380  ) {
381  continue;
382  }
383 
384  $a_xml->xmlStartTag(
385  'ContainerSetting',
386  [
387  'id' => $keyword,
388  ]
389  );
390 
391  $a_xml->xmlData((string) $value);
392  $a_xml->xmlEndTag("ContainerSetting");
393  }
394 
395  $a_xml->xmlEndTag("ContainerSettings");
396  }
397  }
xmlData(string $data, bool $encode=true, bool $escape=true)
Writes data.
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getContainerDirectory()

static ilContainer::_getContainerDirectory ( int  $a_id)
static

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

References ilFileUtils\getWebspaceDir().

158  : string
159  {
160  return ilFileUtils::getWebspaceDir() . "/container_data/obj_" . $a_id;
161  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

◆ _getContainerSettings()

static ilContainer::_getContainerSettings ( int  $a_id)
static
Parameters
int$a_id
Returns
array<string, string>

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

References $DIC, $ilDB, and $res.

Referenced by ilObjPortfolioBase\cloneBasics(), ilObjCategoryGUI\getActiveBlocks(), ilTaxonomyClassificationProvider\getActiveTaxonomiesForParentRefId(), and ilObjExercise\saveData().

323  : array
324  {
325  global $DIC;
326 
327  $ilDB = $DIC->database();
328 
329  $res = [];
330 
331  $sql = "SELECT keyword, value FROM container_settings WHERE " .
332  " id = " . $ilDB->quote($a_id, 'integer');
333  $set = $ilDB->query($sql);
334  while ($row = $ilDB->fetchAssoc($set)) {
335  $res[$row["keyword"]] = $row["value"];
336  }
337 
338  return $res;
339  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

◆ _hasContainerSetting()

static ilContainer::_hasContainerSetting ( int  $a_id,
string  $a_keyword 
)
static

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

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

Referenced by ilObjectDataSet\getTypes().

279  : string {
280  global $DIC;
281 
282  $ilDB = $DIC->database();
283 
284  $q = "SELECT value FROM container_settings WHERE " .
285  " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
286  " keyword = " . $ilDB->quote($a_keyword, 'text');
287  $set = $ilDB->query($q);
288  $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
289 
290  return (bool) $rec;
291  }
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ Here is the caller graph for this function:

◆ _lookupContainerSetting()

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

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

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

Referenced by ilContSkillMemberTableGUI\__construct(), ilObjCategoryGUI\__construct(), ilObjContentPageGUI\__construct(), ILIAS\UI\Component\Legacy\Content\ItemBlock\ItemBlockSequenceGenerator\__construct(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ILIAS\Repository\Form\addAdditionalFeatures(), ilLocatorGUI\addRepositoryItems(), ILIAS\UI\Component\Legacy\Content\ItemSetManager\applyUserFilter(), ilObjWiki\cloneObject(), ilObjSession\cloneSettings(), ilObjContentPage\doCloneObject(), ILIAS\Object\Properties\CoreProperties\TileImage\ilObjectTileImage\exists(), ilObjectCustomIcon\exists(), ilContSkillMemberTableGUI\fillRow(), ilMailMemberSearchGUI\generateContextArray(), ilTaxonomyClassificationProvider\getActiveTaxonomiesForParentRefId(), ilObjPortfolioTemplateGUI\getEditFormCustomValues(), ilObjExerciseGUI\getEditFormCustomValues(), ILIAS\Object\Properties\CoreProperties\TileImage\ilObjectTileImage\getFullPath(), ilObjectAdditionalPropertiesLegacyRepository\getHeaderActionVisibility(), ilObjContentPageListGUI\getInfoScreenStatus(), ilObjCategoryListGUI\getInfoScreenStatus(), ilObjectAdditionalPropertiesLegacyRepository\getInfoTabVisibility(), ilCourseMembershipGUI\getMailContextOptions(), ilGroupMembershipGUI\getMailContextOptions(), ilNewsItem\getNewsForRefId(), ilTaxMDGUI\getSelectableTaxonomies(), ilObjGroupGUI\getTabs(), ilObjSessionGUI\getTabs(), ilObjCourseGUI\getTabs(), ilObjectAdditionalPropertiesLegacyRepository\getTitleAndIconVisibility(), ilObjectDataSet\getTypes(), ilObjectMetaDataGUI\hasAdvancedMDSettings(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilContainerGUI\initFilter(), ilContainerGUI\initListPresentationForm(), ilGroupMembershipMailNotification\initMail(), ilCourseMembershipMailNotification\initMail(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilObjectGUI\insertHeaderAction(), ilContSkillPresentationGUI\isAccessible(), ILIAS\Taxonomy\Settings\SettingsManager\isActivated(), ilTaggingClassificationProvider\isActive(), ilMembershipNotifications\isActiveForRefId(), ilColumnGUI\isGloballyActivated(), ilObjContentObjectAccess\isInfoEnabled(), ilObjFileBasedLMAccess\isInfoEnabled(), ilBadgeHandler\isObjectActive(), ilCalendarSettings\lookupCalendarActivated(), ilCalendarSettings\lookupCalendarContentPresentationEnabled(), ilContentPageDataSet\readData(), ilContainerRenderer\renderHelperGeneric(), ilContSkillAdminGUI\saveCompetenceAssignment(), ilObject\selfOrParentWithRatingEnabled(), ilObjCategoryGUI\setEditTabs(), ilObjRootFolderGUI\setTitleAndDescription(), ilContainerGUI\setTitleAndDescription(), ilContainerGUI\showContainerFilter(), and ilAdvancedMDRecordObjectOrderings\sortRecords().

258  : string {
259  global $DIC;
260 
261  $ilDB = $DIC->database();
262 
263  $q = "SELECT value FROM container_settings WHERE " .
264  " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
265  " keyword = " . $ilDB->quote($a_keyword, 'text');
266  $set = $ilDB->query($q);
267  $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
268 
269  if (isset($rec['value'])) {
270  return $rec["value"];
271  }
272 
273  return $a_default_value ?? '';
274  }
global $DIC
Definition: shib_login.php:22
$q
Definition: shib_logout.php:21
+ Here is the caller graph for this function:

◆ _writeContainerSetting()

static ilContainer::_writeContainerSetting ( int  $a_id,
string  $a_keyword,
string  $a_value 
)
static

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

References $DIC, $ilDB, ilObject\$log, ilLogger\debug(), and ilLoggerFactory\getLogger().

Referenced by ilObjEmployeeTalkSeries\__construct(), ilObjPortfolioBase\cloneBasics(), ilObjWiki\cloneObject(), ilObjSession\cloneSettings(), ilObjectCustomIcon\copy(), ilObjTalkTemplate\create(), ilObjContentPage\doCloneObject(), ilObjectDataSet\getDependencies(), ilLearningSequenceXMLParser\handleEndTag(), ilCategoryXmlParser\handlerEndTag(), ilGroupXMLParser\handlerEndTag(), ilCourseXMLParser\handlerEndTag(), ilContentPageDataSet\importRecord(), ilAdvancedMetaDataImporter\importXmlRepresentation(), ilObjectCustomIcon\persistIconState(), ilObjectCustomIcon\remove(), ILIAS\Repository\Form\saveAdditionalFeatures(), ilObjExercise\saveData(), ilContainerGUI\saveListPresentation(), ilContSkillAdminGUI\saveSettings(), ilObjCategoryGUI\showTaxAsSideBlockObject(), ilObjectAdditionalPropertiesLegacyRepository\storeHeaderActionVisibility(), ilObjectAdditionalPropertiesLegacyRepository\storeInfoTabVisibility(), ilObjectAdditionalPropertiesLegacyRepository\storeTitleAndIconVisibility(), ilObjCourseGUI\updateObject(), ilObjCategoryGUI\updateObject(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

297  : void {
298  global $DIC;
299 
300  $ilDB = $DIC->database();
301 
302  $query = "DELETE FROM container_settings WHERE " .
303  "id = " . $ilDB->quote($a_id, 'integer') . " " .
304  "AND keyword = " . $ilDB->quote($a_keyword, 'text');
305  $ilDB->manipulate($query);
306 
308  $log->debug("Write container setting, id: " . $a_id . ", keyword: " . $a_keyword . ", value: " . $a_value);
309 
310  $query = "INSERT INTO container_settings (id, keyword, value) VALUES (" .
311  $ilDB->quote($a_id, 'integer') . ", " .
312  $ilDB->quote($a_keyword, 'text') . ", " .
313  $ilDB->quote($a_value, 'text') .
314  ")";
315 
316  $ilDB->manipulate($query);
317  }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: shib_login.php:22
ilLogger $log
debug(string $message, array $context=[])
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addAdditionalSubItemInformation()

ilContainer::addAdditionalSubItemInformation ( array &  $object)

Add additional information to sub item, e.g.

used in courses for timings information etc.

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

Referenced by getSubItems().

795  : void
796  {
797  }
+ Here is the caller graph for this function:

◆ addTranslation()

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

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

Referenced by create().

1041  : void {
1042  if (empty($a_title)) {
1043  $a_title = "NO TITLE";
1044  }
1045 
1046  $this->obj_trans->addLanguage($a_lang, $a_title, $a_desc, (bool) $a_lang_default, true);
1047  $this->obj_trans->save();
1048  }
+ Here is the caller graph for this function:

◆ applyContainerUserFilter()

ilContainer::applyContainerUserFilter ( array  $objects,
?ilContainerUserFilter  $container_user_filter = null 
)
protected

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

References ilObject\getId().

Referenced by getSubItems().

1053  : array {
1054  $filter = $this->domain->content()->filter(
1055  $objects,
1056  $container_user_filter,
1057  !self::_lookupContainerSetting($this->getId(), "filter_show_empty", false)
1058  );
1059  return $filter->apply();
1060  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneAllObject()

ilContainer::cloneAllObject ( string  $session_id,
string  $client_id,
string  $new_type,
int  $ref_id,
int  $clone_source,
array  $options,
bool  $soap_call = false,
int  $a_submode = 1 
)
Parameters
string$session_id
string$client_id
string$new_type
int$ref_id
int$clone_source
array$options
bool$soap_callforce soap
int$a_submodesubmode 1 => copy all, 2 => copy content
Returns
array

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

References ilObject\$log, $res, $user, ilCopyWizardOptions\_allocateCopyId(), ilSession\_duplicate(), ilCopyWizardOptions\_getInstance(), ilLoggerFactory\getLogger(), ilSoapFunctions\ilClone(), ILIAS\Repository\int(), and ilObjectCopyGUI\SUBMODE_CONTENT_ONLY.

520  : array {
521  $ilLog = $this->log;
522  $ilUser = $this->user;
523 
524  // Save wizard options
526  $wizard_options = ilCopyWizardOptions::_getInstance($copy_id);
527  $wizard_options->saveOwner($ilUser->getId());
528  $wizard_options->saveRoot($clone_source);
529 
530  // add entry for source container
531  $wizard_options->initContainer($clone_source, $ref_id);
532 
533  foreach ($options as $source_id => $option) {
534  $wizard_options->addEntry($source_id, $option);
535  }
536  $wizard_options->read();
537  $wizard_options->storeTree($clone_source);
538 
539  if ($a_submode === ilObjectCopyGUI::SUBMODE_CONTENT_ONLY) {
540  ilLoggerFactory::getLogger('obj')->info('Copy content only...');
541  ilLoggerFactory::getLogger('obj')->debug('Added mapping, source ID: ' . $clone_source . ', target ID: ' . $ref_id);
542  $wizard_options->read();
543  $wizard_options->dropFirstNode();
544  $wizard_options->appendMapping($clone_source, $ref_id);
545  }
546 
547 
548  #print_r($options);
549  // Duplicate session to avoid logout problems with backgrounded SOAP calls
550  $new_session_id = ilSession::_duplicate($session_id);
551  // Start cloning process using soap call
552  $soap_client = new ilSoapClient();
553  $soap_client->setResponseTimeout($soap_client->getResponseTimeout());
554  $soap_client->enableWSDL(true);
555 
556  $ilLog->write(__METHOD__ . ': Trying to call Soap client...');
557  if ($soap_client->init()) {
558  ilLoggerFactory::getLogger('obj')->info('Calling soap clone method');
559  $res = $soap_client->call('ilClone', [$new_session_id . '::' . $client_id, $copy_id]);
560  } else {
561  ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
562  $wizard_options->disableSOAP();
563  $wizard_options->read();
564  $res = ilSoapFunctions::ilClone($new_session_id . '::' . $client_id, $copy_id);
565  }
566  return [
567  'copy_id' => $copy_id,
568  'ref_id' => (int) $res
569  ];
570  }
$res
Definition: ltiservices.php:66
static _duplicate(string $a_session_id)
Duplicate session.
static getLogger(string $a_component_id)
Get component logger.
static ilClone(string $sid, int $copy_identifier)
static _allocateCopyId()
Allocate a copy for further entries.
$client_id
Definition: ltiauth.php:66
ilLogger $log
static _getInstance(int $a_copy_id)
+ Here is the call graph for this function:

◆ cloneDependencies()

ilContainer::cloneDependencies ( int  $target_id,
int  $copy_id 
)

Clone object dependencies (container sorting)

public

Parameters
inttarget ref id of new course
intcopy id return bool

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

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

477  : bool
478  {
479  $ilLog = $this->log;
480 
481  parent::cloneDependencies($target_id, $copy_id);
482 
483  ilContainerSorting::_getInstance($this->getId())->cloneSorting($target_id, $copy_id);
484 
485  // fix internal links to other objects
486  self::fixInternalLinksAfterCopy($target_id, $copy_id, $this->getRefId());
487 
488  // fix item group references in page content
490 
491  $olp = ilObjectLP::getInstance($this->getId());
492  $collection = $olp->getCollectionInstance();
493  if ($collection) {
494  $collection->cloneCollection($target_id, $copy_id);
495  }
496 
497  return true;
498  }
static fixContainerItemGroupRefsAfterCloning(ilContainer $a_source_container, int $a_copy_id)
static _getInstance(int $a_obj_id)
ilLogger $log
static getInstance(int $obj_id)
+ Here is the call graph for this function:

◆ create()

ilContainer::create ( )

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

References $DIC, ilObject\$lng, ilObject\$log, addTranslation(), ilLogger\debug(), ilLanguage\getDefaultLanguage(), ilObject\getDescription(), ilObject\getId(), ilObjectTranslation\getInstance(), ilLoggerFactory\getLogger(), getNewsBlockActivated(), getNewsTimeline(), getNewsTimelineAutoEntries(), getNewsTimelineLandingPage(), getStyleSheetId(), ilObject\getTitle(), getUseNews(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, and ilObjectServiceSettingsGUI\USE_NEWS.

Referenced by ilObjEmployeeTalkSeries\__construct().

821  : int
822  {
823  global $DIC;
824 
825  $lng = $DIC->language();
826 
827  $ret = parent::create();
828 
829  // set translation object, since we have an object id now
830  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
831 
832  // add default translation
833  $this->addTranslation(
834  $this->getTitle(),
835  $this->getDescription(),
837  '1'
838  );
839 
840  if (($this->getStyleSheetId()) > 0) {
841  //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
842  }
843 
845  $log->debug("Create Container, id: " . $this->getId());
846 
847  self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
848  self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) ((int) $this->getNewsTimelineAutoEntries()));
849  self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) $this->getNewsTimelineLandingPage()));
850  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (string) ((int) $this->getNewsBlockActivated()));
851  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (string) ((int) $this->getUseNews()));
852 
853  return $ret;
854  }
static getLogger(string $a_component_id)
Get component logger.
addTranslation(string $a_title, string $a_desc, string $a_lang, string $a_lang_default)
getDefaultLanguage()
Return default language.
ilLanguage $lng
static getInstance(int $obj_id)
global $DIC
Definition: shib_login.php:22
ilLogger $log
debug(string $message, array $context=[])
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createContainerDirectory()

ilContainer::createContainerDirectory ( )

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

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

140  : void
141  {
142  $webspace_dir = ilFileUtils::getWebspaceDir();
143  $cont_dir = $webspace_dir . "/container_data";
144  if (!is_dir($cont_dir)) {
145  ilFileUtils::makeDir($cont_dir);
146  }
147  $obj_dir = $cont_dir . "/obj_" . $this->getId();
148  if (!is_dir($obj_dir)) {
149  ilFileUtils::makeDir($obj_dir);
150  }
151  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
+ Here is the call graph for this function:

◆ delete()

ilContainer::delete ( )

delete category and all related data

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

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

577  : bool
578  {
579  // always call parent delete function first!!
580  if (!parent::delete()) {
581  return false;
582  }
583  // delete translations
584  $this->obj_trans->delete();
585 
586  return true;
587  }

◆ deleteTranslation()

ilContainer::deleteTranslation ( string  $a_lang)

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

1030  : void
1031  {
1032  $this->obj_trans->removeLanguage($a_lang);
1033  $this->obj_trans->save();
1034  }

◆ enablePageEditing()

ilContainer::enablePageEditing ( )

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

References $ilSetting, and $setting.

810  : bool
811  {
813 
814  // @todo: this will need a more general approach
815  if ($ilSetting->get("enable_cat_page_edit")) {
816  return true;
817  }
818  return false;
819  }
global $ilSetting
Definition: privfeed.php:31
ilSetting $setting

◆ filteredSubtree()

ilContainer::filteredSubtree ( )

Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs.

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

References ilObject\getType(), and isClassificationFilterActive().

Referenced by getInitialSubitems(), and ILIAS\UI\Component\Legacy\Content\DomainService\view().

622  : bool
623  {
624  if ($this->isClassificationFilterActive() && in_array($this->getType(), ["grp", "crs"])) {
625  return true;
626  }
627  return false;
628  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

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

References $DIC, $ilSetting, ilObject\$long_desc, ilObject\$type, ilPageObject\_exists(), ilCopyWizardOptions\_getInstance(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilObject\DESC_LENGTH, ilObjectDefinition\getClassName(), ilPageObjectFactory\getInstance(), ilObjectDefinition\getLocation(), ilObject\getLongDescriptions(), and ilStr\shortenTextExtended().

Referenced by ILIAS\Containter\Content\ItemRenderer\renderItem(), ilContainerContentGUI\renderItem(), and ilContainerContentGUI\renderItemGroup().

930  : array
931  {
932  global $DIC;
933 
934  $ilSetting = $DIC->settings();
935  $ilObjDataCache = $DIC["ilObjDataCache"];
936 
937  // using long descriptions?
938  $short_desc = $ilSetting->get("rep_shorten_description");
939  $short_desc_max_length = $ilSetting->get("rep_shorten_description_length");
940  if (!$short_desc || (int) $short_desc_max_length !== ilObject::DESC_LENGTH) {
941  // using (part of) shortened description
942  if ($short_desc && $short_desc_max_length && $short_desc_max_length < ilObject::DESC_LENGTH) {
943  foreach ($objects as $key => $object) {
944  $objects[$key]["description"] = ilStr::shortenTextExtended(
945  $object["description"],
946  (int) $short_desc_max_length,
947  true
948  );
949  }
950  }
951  // using (part of) long description
952  else {
953  $obj_ids = [];
954  foreach ($objects as $key => $object) {
955  $obj_ids[] = $object["obj_id"];
956  }
957  if (count($obj_ids)) {
959  foreach ($objects as $key => $object) {
960  // #12166 - keep translation, ignore long description
961  if ($ilObjDataCache->isTranslatedDescription((int) $object["obj_id"])) {
962  $long_desc[$object["obj_id"]] = $object["description"];
963  }
964  if ($short_desc && $short_desc_max_length) {
965  $long_desc[$object["obj_id"]] = ilStr::shortenTextExtended(
966  $long_desc[$object["obj_id"]] ?? '',
967  (int) $short_desc_max_length,
968  true
969  );
970  }
971  $objects[$key]["description"] = $long_desc[$object["obj_id"]] ?? '';
972  }
973  }
974  }
975  }
976  return $objects;
977  }
const DESC_LENGTH
static getLongDescriptions(array $obj_ids)
global $DIC
Definition: shib_login.php:22
string $long_desc
global $ilSetting
Definition: privfeed.php:31
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContainerDirectory()

ilContainer::getContainerDirectory ( )

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

References ilObject\getId().

153  : string
154  {
155  return self::_getContainerDirectory($this->getId());
156  }
+ Here is the call graph for this function:

◆ getGroupedObjTypes()

ilContainer::getGroupedObjTypes ( )

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

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

800  : array
801  {
802  $objDefinition = $this->obj_definition;
803 
804  if (empty($this->type_grps)) {
805  $this->type_grps = $objDefinition::getGroupedRepositoryObjectTypes($this->getType());
806  }
807  return $this->type_grps;
808  }
ilObjectDefinition $obj_definition
+ Here is the call graph for this function:

◆ getHiddenFilesFound()

ilContainer::getHiddenFilesFound ( )

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

References $hiddenfilesfound.

169  : bool
170  {
172  }

◆ getInitialSubitems()

ilContainer::getInitialSubitems ( )
protected
Deprecated:

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

References ilObject\$tree, filteredSubtree(), ilTree\getChilds(), ilTree\getNodeData(), ilObject\getRefId(), and ilTree\getSubTree().

Referenced by getSubItems().

633  : array
634  {
635  $tree = $this->tree;
636  if ($this->filteredSubtree()) {
637  $objects = $tree->getSubTree($tree->getNodeData($this->getRefId()));
638  } else {
639  $objects = $tree->getChilds($this->getRefId(), "title");
640  }
641  return $objects;
642  }
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
filteredSubtree()
Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs...
ilTree $tree
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNewsBlockActivated()

ilContainer::getNewsBlockActivated ( )

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

References $news_block_activated.

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

239  : bool
240  {
242  }
bool $news_block_activated
+ Here is the caller graph for this function:

◆ getNewsTimeline()

ilContainer::getNewsTimeline ( )

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

References $news_timeline.

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

189  : bool
190  {
191  return $this->news_timeline;
192  }
+ Here is the caller graph for this function:

◆ getNewsTimelineAutoEntries()

ilContainer::getNewsTimelineAutoEntries ( )

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

References $news_timeline_auto_entries.

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

199  : bool
200  {
202  }
bool $news_timeline_auto_entries
+ Here is the caller graph for this function:

◆ getNewsTimelineLandingPage()

ilContainer::getNewsTimelineLandingPage ( )

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

References $news_timeline_landing_page.

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

209  : bool
210  {
212  }
bool $news_timeline_landing_page
+ Here is the caller graph for this function:

◆ getObjectTranslation()

ilContainer::getObjectTranslation ( )

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

References $obj_trans.

Referenced by ilObjStudyProgrammeSettingsGUI\buildForm(), and update().

130  {
131  return $this->obj_trans;
132  }
ilObjectTranslation $obj_trans
+ Here is the caller graph for this function:

◆ getOrderType()

ilContainer::getOrderType ( )

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

594  : int
595  {
596  return $this->order_type ?: self::SORT_TITLE;
597  }

◆ getStyleSheetId()

ilContainer::getStyleSheetId ( )

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

References $style_id.

Referenced by create().

174  : int
175  {
176  return $this->style_id;
177  }
+ Here is the caller graph for this function:

◆ getSubItems()

ilContainer::getSubItems ( bool  $a_admin_panel_enabled = false,
bool  $a_include_side_block = false,
int  $a_get_single = 0,
?ilContainerUserFilter  $container_user_filter = null 
)
Deprecated:

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

References $classification, $id, $obj_definition, ilObject\$type, ilContainerSorting\_getInstance(), ilObjFileAccess\_isFileHidden(), addAdditionalSubItemInformation(), applyContainerUserFilter(), ilObjectListGUI\CONTEXT_REPOSITORY, ilObject\getId(), getInitialSubitems(), ilObjectActivation\getItemsByEvent(), ilObject\getRefId(), ilObject\getType(), ilClassificationProvider\getValidProviders(), ILIAS\Repository\int(), isClassificationFilterActive(), null, and setHiddenFilesFound().

Referenced by ilEmployeeTalkAppointmentGUI\getPendingTalksInSeries().

652  : array {
653  $objDefinition = $this->obj_definition;
654 
655  // Caching
656  if (
657  isset($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
658  is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
659  !$a_get_single
660  ) {
661  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
662  }
663 
664  $objects = $this->getInitialSubitems();
665  $objects = $this->applyContainerUserFilter($objects, $container_user_filter);
666  $objects = self::getCompleteDescriptions($objects);
667 
668  // apply container classification filters
669  $classification = $this->domain->classification($this->getRefId());
670  foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
671  $id = get_class($class_provider);
672  $current = $classification->getSelectionOfProvider($id);
673  if ($current) {
674  $class_provider->setSelection($current);
675  $filtered = $class_provider->getFilteredObjects();
676  $objects = array_filter($objects, static function (array $i) use ($filtered): bool {
677  return (is_array($filtered) && in_array($i["obj_id"], $filtered));
678  });
679  }
680  }
681 
682  $found = false;
683  $all_ref_ids = [];
684 
685  $preloader = null;
686  if (!self::$data_preloaded) {
688  }
689 
690  $sort = ilContainerSorting::_getInstance($this->getId());
691 
692  // TODO: check this
693  // get items attached to a session
694 
695  $classification_filter_active = $this->isClassificationFilterActive();
696  foreach ($objects as $key => $object) {
697  // see #41377, this ensures session materials to be preloaded
698  if (!self::$data_preloaded) {
699  if ($object["type"] === "sess") {
700  $ev_items = ilObjectActivation::getItemsByEvent((int) $object["obj_id"]);
701  foreach ($ev_items as $ev_item) {
702  $preloader->addItem((int) $ev_item["obj_id"], $ev_item["type"], $ev_item["ref_id"]);
703  }
704  }
705  }
706  if ($a_get_single > 0 && $object["child"] != $a_get_single) {
707  continue;
708  }
709 
710  // hide object types in devmode
711  if ($object["type"] === "adm" || $object["type"] === "rolf" || $objDefinition->getDevMode($object["type"])) {
712  continue;
713  }
714 
715  // remove inactive plugins
716  if ($objDefinition->isInactivePlugin($object["type"])) {
717  continue;
718  }
719  // BEGIN WebDAV: Don't display hidden Files, Folders and Categories
720  if (in_array(
721  $object['type'],
722  ['file', 'fold', 'cat'],
723  true
724  ) && ilObjFileAccess::_isFileHidden((string) $object['title'])) {
725  $this->setHiddenFilesFound(true);
726  if (!$a_admin_panel_enabled) {
727  continue;
728  }
729  }
730  // END WebDAV: Don't display hidden Files, Folders and Categories
731 
732  if (!self::$data_preloaded) {
733  $preloader->addItem((int) $object["obj_id"], $object["type"], $object["child"]);
734  }
735 
736  // filter side block items
737  if (!$a_include_side_block && $objDefinition->isSideBlock($object['type'])) {
738  continue;
739  }
740 
741  $all_ref_ids[] = (int) $object["child"];
742  }
743 
744  // data preloader
745  if (!self::$data_preloaded) {
746  $preloader->preload();
747  unset($preloader);
748 
749  self::$data_preloaded = true;
750  }
751 
752  foreach ($objects as $key => $object) {
753  // see above, objects were filtered
754  if (!in_array($object["child"], $all_ref_ids)) {
755  continue;
756  }
757 
758  // group object type groups together (e.g. learning resources)
759  $type = $objDefinition->getGroupOfObj($object["type"]);
760  if ($type == "") {
761  $type = $object["type"];
762  }
763 
764  // this will add activation properties
765  $this->addAdditionalSubItemInformation($object);
766 
767  $this->items[$type][$key] = $object;
768 
769  $this->items["_all"][$key] = $object;
770  if ($object["type"] !== "sess") {
771  $this->items["_non_sess"][$key] = $object;
772  }
773  }
774  $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]
775  = $sort->sortItems($this->items);
776 
777  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
778  }
string $type
setHiddenFilesFound(bool $a_hiddenfilesfound)
applyContainerUserFilter(array $objects, ?ilContainerUserFilter $container_user_filter=null)
static getItemsByEvent(int $event_id)
Get session material / event items.
static _isFileHidden(string $a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user. ...
ilObjectDefinition $obj_definition
addAdditionalSubItemInformation(array &$object)
Add additional information to sub item, e.g.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Preloader for object list GUIs.
$classification
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static _getInstance(int $a_obj_id)
static getValidProviders(int $a_parent_ref_id, int $a_parent_obj_id, string $a_parent_obj_type)
Get all valid providers (for parent container)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTileSizes()

ilContainer::getTileSizes ( )
Returns
array<int,string>

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

References ilObject\$lng, and ilLanguage\txt().

117  : array
118  {
119  $lng = $this->lng;
120  return [
121  self::TILE_SMALL => $lng->txt("cont_tile_size_1"),
122  self::TILE_NORMAL => $lng->txt("cont_tile_size_0"),
123  self::TILE_LARGE => $lng->txt("cont_tile_size_2"),
124  self::TILE_EXTRA_LARGE => $lng->txt("cont_tile_size_3"),
125  self::TILE_FULL => $lng->txt("cont_tile_size_4")
126  ];
127  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
+ Here is the call graph for this function:

◆ getUseNews()

ilContainer::getUseNews ( )

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

References $use_news.

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

249  : bool
250  {
251  return $this->use_news;
252  }
+ Here is the caller graph for this function:

◆ getViewMode()

ilContainer::getViewMode ( )

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

Referenced by ILIAS\UI\Component\Legacy\Content\DomainService\view().

589  : int
590  {
591  return self::VIEW_BY_TYPE;
592  }
+ Here is the caller graph for this function:

◆ gotItems()

ilContainer::gotItems ( )
Deprecated:

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

783  : bool
784  {
785  if (isset($this->items["_all"]) && is_array($this->items["_all"]) && count($this->items["_all"]) > 0) {
786  return true;
787  }
788  return false;
789  }

◆ isClassificationFilterActive()

ilContainer::isClassificationFilterActive ( )

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

References $classification, $id, ilObject\getId(), ilObject\getRefId(), ilObject\getType(), and ilClassificationProvider\getValidProviders().

Referenced by filteredSubtree(), and getSubItems().

604  : bool
605  {
606  // apply container classification filters
607  $classification = $this->domain->classification($this->getRefId());
608  foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
609  $id = get_class($class_provider);
610  $current = $classification->getSelectionOfProvider($id);
611  if ($current) {
612  return true;
613  }
614  }
615  return false;
616  }
$classification
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getValidProviders(int $a_parent_ref_id, int $a_parent_obj_id, string $a_parent_obj_type)
Get all valid providers (for parent container)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isNewsTimelineEffective()

ilContainer::isNewsTimelineEffective ( )

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

References getNewsTimeline(), and getUseNews().

214  : bool
215  {
216  if (!$this->news->isGloballyActivated()) {
217  return false;
218  }
219  if ($this->getUseNews() && $this->getNewsTimeline()) {
220  return true;
221  }
222  return false;
223  }
+ Here is the call graph for this function:

◆ isNewsTimelineLandingPageEffective()

ilContainer::isNewsTimelineLandingPageEffective ( )

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

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

225  : bool
226  {
227  if ($this->getUseNews() && $this->getNewsTimeline() && $this->getNewsTimelineLandingPage()) {
228  return true;
229  }
230  return false;
231  }
+ Here is the call graph for this function:

◆ putInTree()

ilContainer::putInTree ( int  $parent_ref_id)

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

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

Referenced by ilECSCourseCreationHandler\createCourseReference().

856  : void
857  {
858  parent::putInTree($parent_ref_id);
859 
860  // copy title, icon actions visibilities
861  if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_header_icon_and_title")) {
862  self::_writeContainerSetting($this->getId(), "hide_header_icon_and_title", '1');
863  }
864  if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_top_actions")) {
865  self::_writeContainerSetting($this->getId(), "hide_top_actions", '1');
866  }
867  }
static _lookupObjId(int $ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilContainer::read ( )

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

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

Referenced by ilObjOrgUnit\__construct().

899  : void
900  {
901  parent::read();
902 
904 
905  //$this->setStyleSheetId(ilObjStyleSheet::lookupObjectStyle($this->getId()));
906 
907  $this->readContainerSettings();
908  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
909  }
setOrderType(int $a_value)
static getInstance(int $obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readContainerSettings()

ilContainer::readContainerSettings ( )

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

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

Referenced by read().

911  : void
912  {
913  $this->setNewsTimeline((bool) self::_lookupContainerSetting($this->getId(), "news_timeline"));
914  $this->setNewsTimelineAutoEntries((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_incl_auto"));
915  $this->setNewsTimelineLandingPage((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_landing_page"));
916  $this->setNewsBlockActivated((bool) self::_lookupContainerSetting(
917  $this->getId(),
919  $this->setting->get('block_activated_news', '1')
920  ));
921  $this->setUseNews((bool) self::_lookupContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, '1') &&
922  $this->news->isGloballyActivated());
923  }
setNewsBlockActivated(bool $a_val)
setNewsTimelineLandingPage(bool $a_val)
setNewsTimeline(bool $a_val)
setUseNews(bool $a_val)
setNewsTimelineAutoEntries(bool $a_val)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeTranslations()

ilContainer::removeTranslations ( )

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

1025  : void
1026  {
1027  $this->obj_trans->delete();
1028  }

◆ setHiddenFilesFound()

ilContainer::setHiddenFilesFound ( bool  $a_hiddenfilesfound)

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

Referenced by getSubItems().

164  : void
165  {
166  $this->hiddenfilesfound = $a_hiddenfilesfound;
167  }
+ Here is the caller graph for this function:

◆ setNewsBlockActivated()

ilContainer::setNewsBlockActivated ( bool  $a_val)

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

Referenced by readContainerSettings().

234  : void
235  {
236  $this->news_block_activated = $a_val;
237  }
+ Here is the caller graph for this function:

◆ setNewsTimeline()

ilContainer::setNewsTimeline ( bool  $a_val)

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

Referenced by readContainerSettings().

184  : void
185  {
186  $this->news_timeline = $a_val;
187  }
+ Here is the caller graph for this function:

◆ setNewsTimelineAutoEntries()

ilContainer::setNewsTimelineAutoEntries ( bool  $a_val)

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

Referenced by readContainerSettings().

194  : void
195  {
196  $this->news_timeline_auto_entries = $a_val;
197  }
+ Here is the caller graph for this function:

◆ setNewsTimelineLandingPage()

ilContainer::setNewsTimelineLandingPage ( bool  $a_val)

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

Referenced by readContainerSettings().

204  : void
205  {
206  $this->news_timeline_landing_page = $a_val;
207  }
+ Here is the caller graph for this function:

◆ setObjectTranslation()

ilContainer::setObjectTranslation ( ?ilObjectTranslation  $obj_trans)

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

References $obj_trans.

134  : void
135  {
136  $this->obj_trans = $obj_trans;
137  }
ilObjectTranslation $obj_trans

◆ setOrderType()

ilContainer::setOrderType ( int  $a_value)

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

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

599  : void
600  {
601  $this->order_type = $a_value;
602  }
+ Here is the caller graph for this function:

◆ setStyleSheetId()

ilContainer::setStyleSheetId ( int  $a_style_id)

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

179  : void
180  {
181  $this->style_id = $a_style_id;
182  }

◆ setUseNews()

ilContainer::setUseNews ( bool  $a_val)

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

Referenced by readContainerSettings().

244  : void
245  {
246  $this->use_news = $a_val;
247  }
+ Here is the caller graph for this function:

◆ update()

ilContainer::update ( )

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

References ilObject\$log, ilLogger\debug(), ilObject\getId(), ilLoggerFactory\getLogger(), ilObject\getLongDescription(), getNewsBlockActivated(), getNewsTimeline(), getNewsTimelineAutoEntries(), getNewsTimelineLandingPage(), getObjectTranslation(), ilObject\getTitle(), getUseNews(), ilLogger\logStack(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, and ilObjectServiceSettingsGUI\USE_NEWS.

Referenced by ilObjEmployeeTalkSeries\__construct(), and ilObjEmployeeTalkSeriesGUI\copyTemplateValues().

869  : bool
870  {
871  $ret = parent::update();
872 
874  $log->debug("**5**" . count($this->getObjectTranslation()->getLanguages()));
875 
876  $trans = $this->getObjectTranslation();
877  $trans->setDefaultTitle($this->getTitle());
878  $trans->setDefaultDescription($this->getLongDescription());
879  $trans->save();
880 
882  $log->debug(":::::::::::::::::::::::::::");
883  $log->logStack(10);
884 
885  //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
886 
888  $log->debug("Update Container, id: " . $this->getId());
889 
890  self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
891  self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) (int) $this->getNewsTimelineAutoEntries());
892  self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) ($this->getNewsTimelineLandingPage())));
893  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (string) ((int) $this->getNewsBlockActivated()));
894  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (string) ((int) $this->getUseNews()));
895 
896  return $ret;
897  }
static getLogger(string $a_component_id)
Get component logger.
logStack(?int $level=null, string $message='', array $context=[])
getLongDescription()
get object long description (stored in object_description)
ilLogger $log
debug(string $message, array $context=[])
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilContainer::$access
protected

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

◆ $content_style_domain

ILIAS Style Content DomainService ilContainer::$content_style_domain
protected

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

◆ $data_preloaded

bool ilContainer::$data_preloaded = false
static

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

◆ $domain

ILIAS Container InternalDomainService ilContainer::$domain
protected

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

◆ $hiddenfilesfound

bool ilContainer::$hiddenfilesfound = false
protected

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

Referenced by getHiddenFilesFound().

◆ $items

array ilContainer::$items = []

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

◆ $news

News ilContainer::$news
protected

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

◆ $news_block_activated

bool ilContainer::$news_block_activated = false
protected

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

Referenced by getNewsBlockActivated().

◆ $news_timeline

bool ilContainer::$news_timeline = false
protected

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

Referenced by getNewsTimeline().

◆ $news_timeline_auto_entries

bool ilContainer::$news_timeline_auto_entries = false
protected

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

Referenced by getNewsTimelineAutoEntries().

◆ $news_timeline_landing_page

bool ilContainer::$news_timeline_landing_page = false
protected

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

Referenced by getNewsTimelineLandingPage().

◆ $obj_definition

ilObjectDefinition ilContainer::$obj_definition
protected

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

Referenced by getGroupedObjTypes(), and getSubItems().

◆ $obj_trans

ilObjectTranslation ilContainer::$obj_trans = null
protected

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

Referenced by getObjectTranslation(), and setObjectTranslation().

◆ $order_type

int ilContainer::$order_type = 0
protected

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

◆ $rbacsystem

ilRbacSystem ilContainer::$rbacsystem
protected

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

◆ $recommended_content_manager

ilRecommendedContentManager ilContainer::$recommended_content_manager
protected

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

◆ $setting

ilSetting ilContainer::$setting
protected

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

Referenced by enablePageEditing().

◆ $style_id

int ilContainer::$style_id = 0
protected

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

Referenced by getStyleSheetId().

◆ $type_grps

array ilContainer::$type_grps = null
protected

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

Referenced by getGroupedObjTypes().

◆ $use_news

bool ilContainer::$use_news = false
protected

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

Referenced by getUseNews().

◆ $user

ilObjUser ilContainer::$user
protected

Definition at line 70 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

◆ TILE_EXTRA_LARGE

const ilContainer::TILE_EXTRA_LARGE = 3

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_FULL

const ilContainer::TILE_FULL = 4

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_LARGE

const ilContainer::TILE_LARGE = 2

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_NORMAL

const ilContainer::TILE_NORMAL = 0

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

◆ TILE_SMALL

const ilContainer::TILE_SMALL = 1

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ VIEW_ARCHIVE

const ilContainer::VIEW_ARCHIVE = 3

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

◆ VIEW_BY_TYPE

◆ VIEW_DEFAULT

const ilContainer::VIEW_DEFAULT = self::VIEW_BY_TYPE

◆ VIEW_INHERIT

◆ VIEW_OBJECTIVE

◆ VIEW_SESSIONS

◆ VIEW_SIMPLE

◆ VIEW_TIMING


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