ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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:25
+ 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:69
global $DIC
Definition: shib_login.php:25
+ 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:25
$q
Definition: shib_logout.php:18
+ 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\Style\Content\ItemBlock\ItemBlockSequenceGenerator\__construct(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ILIAS\Repository\Form\addAdditionalFeatures(), ilLocatorGUI\addRepositoryItems(), ILIAS\Style\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:25
$q
Definition: shib_logout.php:18
+ 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 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(), ilObjEmployeeTalkSeries\read(), 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:25
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 799 of file class.ilContainer.php.

Referenced by getSubItems().

799  : void
800  {
801  }
+ 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 1040 of file class.ilContainer.php.

Referenced by create().

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

◆ applyContainerUserFilter()

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

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

References ilObject\getId().

Referenced by getSubItems().

1057  : array {
1058  $filter = $this->domain->content()->filter(
1059  $objects,
1060  $container_user_filter,
1061  !self::_lookupContainerSetting($this->getId(), "filter_show_empty", false)
1062  );
1063  return $filter->apply();
1064  }
+ 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 515 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.

524  : array {
525  $ilLog = $this->log;
526  $ilUser = $this->user;
527 
528  // Save wizard options
530  $wizard_options = ilCopyWizardOptions::_getInstance($copy_id);
531  $wizard_options->saveOwner($ilUser->getId());
532  $wizard_options->saveRoot($clone_source);
533 
534  // add entry for source container
535  $wizard_options->initContainer($clone_source, $ref_id);
536 
537  foreach ($options as $source_id => $option) {
538  $wizard_options->addEntry($source_id, $option);
539  }
540  $wizard_options->read();
541  $wizard_options->storeTree($clone_source);
542 
543  if ($a_submode === ilObjectCopyGUI::SUBMODE_CONTENT_ONLY) {
544  ilLoggerFactory::getLogger('obj')->info('Copy content only...');
545  ilLoggerFactory::getLogger('obj')->debug('Added mapping, source ID: ' . $clone_source . ', target ID: ' . $ref_id);
546  $wizard_options->read();
547  $wizard_options->dropFirstNode();
548  $wizard_options->appendMapping($clone_source, $ref_id);
549  }
550 
551 
552  #print_r($options);
553  // Duplicate session to avoid logout problems with backgrounded SOAP calls
554  $new_session_id = ilSession::_duplicate($session_id);
555  // Start cloning process using soap call
556  $soap_client = new ilSoapClient();
557  $soap_client->setResponseTimeout($soap_client->getResponseTimeout());
558  $soap_client->enableWSDL(true);
559 
560  $ilLog->write(__METHOD__ . ': Trying to call Soap client...');
561  if ($soap_client->init()) {
562  ilLoggerFactory::getLogger('obj')->info('Calling soap clone method');
563  $res = $soap_client->call('ilClone', [$new_session_id . '::' . $client_id, $copy_id]);
564  } else {
565  ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
566  $wizard_options->disableSOAP();
567  $wizard_options->read();
568  $res = ilSoapFunctions::ilClone($new_session_id . '::' . $client_id, $copy_id);
569  }
570  return [
571  'copy_id' => $copy_id,
572  'ref_id' => (int) $res
573  ];
574  }
$res
Definition: ltiservices.php:69
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:67
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 481 of file class.ilContainer.php.

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

481  : bool
482  {
483  $ilLog = $this->log;
484 
485  parent::cloneDependencies($target_id, $copy_id);
486 
487  ilContainerSorting::_getInstance($this->getId())->cloneSorting($target_id, $copy_id);
488 
489  // fix internal links to other objects
490  self::fixInternalLinksAfterCopy($target_id, $copy_id, $this->getRefId());
491 
492  // fix item group references in page content
494 
495  $olp = ilObjectLP::getInstance($this->getId());
496  $collection = $olp->getCollectionInstance();
497  if ($collection) {
498  $collection->cloneCollection($target_id, $copy_id);
499  }
500 
501  return true;
502  }
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 825 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\read().

825  : int
826  {
827  global $DIC;
828 
829  $lng = $DIC->language();
830 
831  $ret = parent::create();
832 
833  // set translation object, since we have an object id now
834  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
835 
836  // add default translation
837  $this->addTranslation(
838  $this->getTitle(),
839  $this->getDescription(),
841  '1'
842  );
843 
844  if (($this->getStyleSheetId()) > 0) {
845  //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
846  }
847 
849  $log->debug("Create Container, id: " . $this->getId());
850 
851  self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
852  self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) ((int) $this->getNewsTimelineAutoEntries()));
853  self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) $this->getNewsTimelineLandingPage()));
854  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (string) ((int) $this->getNewsBlockActivated()));
855  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (string) ((int) $this->getUseNews()));
856 
857  return $ret;
858  }
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:25
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 581 of file class.ilContainer.php.

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

◆ deleteTranslation()

ilContainer::deleteTranslation ( string  $a_lang)

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

1034  : void
1035  {
1036  $this->obj_trans->removeLanguage($a_lang);
1037  $this->obj_trans->save();
1038  }

◆ enablePageEditing()

ilContainer::enablePageEditing ( )

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

References $ilSetting, and $setting.

814  : bool
815  {
817 
818  // @todo: this will need a more general approach
819  if ($ilSetting->get("enable_cat_page_edit")) {
820  return true;
821  }
822  return false;
823  }
global $ilSetting
Definition: privfeed.php:32
ilSetting $setting

◆ filteredSubtree()

ilContainer::filteredSubtree ( )

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

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

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

Referenced by getInitialSubitems(), and ILIAS\Style\Content\DomainService\view().

626  : bool
627  {
628  if ($this->isClassificationFilterActive() && in_array($this->getType(), ["grp", "crs"])) {
629  return true;
630  }
631  return false;
632  }
+ 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 934 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().

934  : array
935  {
936  global $DIC;
937 
938  $ilSetting = $DIC->settings();
939  $ilObjDataCache = $DIC["ilObjDataCache"];
940 
941  // using long descriptions?
942  $short_desc = $ilSetting->get("rep_shorten_description");
943  $short_desc_max_length = $ilSetting->get("rep_shorten_description_length");
944  if (!$short_desc || (int) $short_desc_max_length !== ilObject::DESC_LENGTH) {
945  // using (part of) shortened description
946  if ($short_desc && $short_desc_max_length && $short_desc_max_length < ilObject::DESC_LENGTH) {
947  foreach ($objects as $key => $object) {
948  $objects[$key]["description"] = ilStr::shortenTextExtended(
949  $object["description"],
950  (int) $short_desc_max_length,
951  true
952  );
953  }
954  }
955  // using (part of) long description
956  else {
957  $obj_ids = [];
958  foreach ($objects as $key => $object) {
959  $obj_ids[] = $object["obj_id"];
960  }
961  if (count($obj_ids)) {
963  foreach ($objects as $key => $object) {
964  // #12166 - keep translation, ignore long description
965  if ($ilObjDataCache->isTranslatedDescription((int) $object["obj_id"])) {
966  $long_desc[$object["obj_id"]] = $object["description"];
967  }
968  if ($short_desc && $short_desc_max_length) {
969  $long_desc[$object["obj_id"]] = ilStr::shortenTextExtended(
970  $long_desc[$object["obj_id"]] ?? '',
971  (int) $short_desc_max_length,
972  true
973  );
974  }
975  $objects[$key]["description"] = $long_desc[$object["obj_id"]] ?? '';
976  }
977  }
978  }
979  }
980  return $objects;
981  }
const DESC_LENGTH
static getLongDescriptions(array $obj_ids)
global $DIC
Definition: shib_login.php:25
string $long_desc
global $ilSetting
Definition: privfeed.php:32
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 804 of file class.ilContainer.php.

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

804  : array
805  {
806  $objDefinition = $this->obj_definition;
807 
808  if (empty($this->type_grps)) {
809  $this->type_grps = $objDefinition::getGroupedRepositoryObjectTypes($this->getType());
810  }
811  return $this->type_grps;
812  }
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 637 of file class.ilContainer.php.

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

Referenced by getSubItems().

637  : array
638  {
639  $tree = $this->tree;
640  if ($this->filteredSubtree()) {
641  $objects = $tree->getSubTree($tree->getNodeData($this->getRefId()));
642  } else {
643  $objects = $tree->getChilds($this->getRefId(), "title");
644  }
645  return $objects;
646  }
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 598 of file class.ilContainer.php.

598  : int
599  {
600  return $this->order_type ?: self::SORT_TITLE;
601  }

◆ 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 651 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(), and setHiddenFilesFound().

Referenced by ilEmployeeTalkAppointmentGUI\getPendingTalksInSeries().

656  : array {
657  $objDefinition = $this->obj_definition;
658 
659  // Caching
660  if (
661  isset($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
662  is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
663  !$a_get_single
664  ) {
665  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
666  }
667 
668  $objects = $this->getInitialSubitems();
669  $objects = $this->applyContainerUserFilter($objects, $container_user_filter);
670  $objects = self::getCompleteDescriptions($objects);
671 
672  // apply container classification filters
673  $classification = $this->domain->classification($this->getRefId());
674  foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
675  $id = get_class($class_provider);
676  $current = $classification->getSelectionOfProvider($id);
677  if ($current) {
678  $class_provider->setSelection($current);
679  $filtered = $class_provider->getFilteredObjects();
680  $objects = array_filter($objects, static function (array $i) use ($filtered): bool {
681  return (is_array($filtered) && in_array($i["obj_id"], $filtered));
682  });
683  }
684  }
685 
686  $found = false;
687  $all_ref_ids = [];
688 
689  $preloader = null;
690  if (!self::$data_preloaded) {
692  }
693 
694  $sort = ilContainerSorting::_getInstance($this->getId());
695 
696  // TODO: check this
697  // get items attached to a session
698 
699  $classification_filter_active = $this->isClassificationFilterActive();
700  foreach ($objects as $key => $object) {
701  // see #41377, this ensures session materials to be preloaded
702  if (!self::$data_preloaded) {
703  if ($object["type"] === "sess") {
704  $ev_items = ilObjectActivation::getItemsByEvent((int) $object["obj_id"]);
705  foreach ($ev_items as $ev_item) {
706  $preloader->addItem((int) $ev_item["obj_id"], $ev_item["type"], $ev_item["ref_id"]);
707  }
708  }
709  }
710  if ($a_get_single > 0 && $object["child"] != $a_get_single) {
711  continue;
712  }
713 
714  // hide object types in devmode
715  if ($object["type"] === "adm" || $object["type"] === "rolf" || $objDefinition->getDevMode($object["type"])) {
716  continue;
717  }
718 
719  // remove inactive plugins
720  if ($objDefinition->isInactivePlugin($object["type"])) {
721  continue;
722  }
723  // BEGIN WebDAV: Don't display hidden Files, Folders and Categories
724  if (in_array(
725  $object['type'],
726  ['file', 'fold', 'cat'],
727  true
728  ) && ilObjFileAccess::_isFileHidden((string) $object['title'])) {
729  $this->setHiddenFilesFound(true);
730  if (!$a_admin_panel_enabled) {
731  continue;
732  }
733  }
734  // END WebDAV: Don't display hidden Files, Folders and Categories
735 
736  if (!self::$data_preloaded) {
737  $preloader->addItem((int) $object["obj_id"], $object["type"], $object["child"]);
738  }
739 
740  // filter side block items
741  if (!$a_include_side_block && $objDefinition->isSideBlock($object['type'])) {
742  continue;
743  }
744 
745  $all_ref_ids[] = (int) $object["child"];
746  }
747 
748  // data preloader
749  if (!self::$data_preloaded) {
750  $preloader->preload();
751  unset($preloader);
752 
753  self::$data_preloaded = true;
754  }
755 
756  foreach ($objects as $key => $object) {
757  // see above, objects were filtered
758  if (!in_array($object["child"], $all_ref_ids)) {
759  continue;
760  }
761 
762  // group object type groups together (e.g. learning resources)
763  $type = $objDefinition->getGroupOfObj($object["type"]);
764  if ($type == "") {
765  $type = $object["type"];
766  }
767 
768  // this will add activation properties
769  $this->addAdditionalSubItemInformation($object);
770 
771  $this->items[$type][$key] = $object;
772 
773  $this->items["_all"][$key] = $object;
774  if ($object["type"] !== "sess") {
775  $this->items["_non_sess"][$key] = $object;
776  }
777  }
778  $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]
779  = $sort->sortItems($this->items);
780 
781  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
782  }
string $type
setHiddenFilesFound(bool $a_hiddenfilesfound)
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.
applyContainerUserFilter(array $objects, ilContainerUserFilter $container_user_filter=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$classification
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
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 593 of file class.ilContainer.php.

Referenced by ILIAS\Style\Content\DomainService\view().

593  : int
594  {
595  return self::VIEW_BY_TYPE;
596  }
+ Here is the caller graph for this function:

◆ gotItems()

ilContainer::gotItems ( )
Deprecated:

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

787  : bool
788  {
789  if (isset($this->items["_all"]) && is_array($this->items["_all"]) && count($this->items["_all"]) > 0) {
790  return true;
791  }
792  return false;
793  }

◆ isClassificationFilterActive()

ilContainer::isClassificationFilterActive ( )

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

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

Referenced by filteredSubtree(), and getSubItems().

608  : bool
609  {
610  // apply container classification filters
611  $classification = $this->domain->classification($this->getRefId());
612  foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
613  $id = get_class($class_provider);
614  $current = $classification->getSelectionOfProvider($id);
615  if ($current) {
616  return true;
617  }
618  }
619  return false;
620  }
$classification
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
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 860 of file class.ilContainer.php.

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

Referenced by ilECSCourseCreationHandler\createCourseReference().

860  : void
861  {
862  parent::putInTree($parent_ref_id);
863 
864  // copy title, icon actions visibilities
865  if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_header_icon_and_title")) {
866  self::_writeContainerSetting($this->getId(), "hide_header_icon_and_title", '1');
867  }
868  if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_top_actions")) {
869  self::_writeContainerSetting($this->getId(), "hide_top_actions", '1');
870  }
871  }
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 903 of file class.ilContainer.php.

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

Referenced by ilObjOrgUnit\__construct().

903  : void
904  {
905  parent::read();
906 
908 
909  //$this->setStyleSheetId(ilObjStyleSheet::lookupObjectStyle($this->getId()));
910 
911  $this->readContainerSettings();
912  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
913  }
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 915 of file class.ilContainer.php.

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

Referenced by read().

915  : void
916  {
917  $this->setNewsTimeline((bool) self::_lookupContainerSetting($this->getId(), "news_timeline"));
918  $this->setNewsTimelineAutoEntries((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_incl_auto"));
919  $this->setNewsTimelineLandingPage((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_landing_page"));
920  $this->setNewsBlockActivated((bool) self::_lookupContainerSetting(
921  $this->getId(),
923  $this->setting->get('block_activated_news', '1')
924  ));
925  $this->setUseNews((bool) self::_lookupContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, '1') &&
926  $this->news->isGloballyActivated());
927  }
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 1029 of file class.ilContainer.php.

1029  : void
1030  {
1031  $this->obj_trans->delete();
1032  }

◆ 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 603 of file class.ilContainer.php.

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

603  : void
604  {
605  $this->order_type = $a_value;
606  }
+ 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 873 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 ilObjEmployeeTalkSeriesGUI\copyTemplateValues(), and ilObjEmployeeTalkSeries\read().

873  : bool
874  {
875  $ret = parent::update();
876 
878  $log->debug("**5**" . count($this->getObjectTranslation()->getLanguages()));
879 
880  $trans = $this->getObjectTranslation();
881  $trans->setDefaultTitle($this->getTitle());
882  $trans->setDefaultDescription($this->getLongDescription());
883  $trans->save();
884 
886  $log->debug(":::::::::::::::::::::::::::");
887  $log->logStack(10);
888 
889  //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
890 
892  $log->debug("Update Container, id: " . $this->getId());
893 
894  self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
895  self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) (int) $this->getNewsTimelineAutoEntries());
896  self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) ($this->getNewsTimelineLandingPage())));
897  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (string) ((int) $this->getNewsBlockActivated()));
898  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (string) ((int) $this->getUseNews()));
899 
900  return $ret;
901  }
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: