ILIAS  release_8 Revision v8.23
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
 __construct (int $id=0, bool $reference=true)
 
 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 $desc)
 
 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 _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)
 Apply container user filter on objects. More...
 
 filterObjIdsByCopyright (array $obj_ids, string $copyright_id)
 
 filterObjIdsByDefaultCopyright (array $obj_ids, string $default_identifier)
 
 legacyOnlineFilter (array $obj_ids, array $objects, int $val)
 Legacy online filter. More...
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Protected Attributes

ILIAS Style Content DomainService $content_style_domain
 
ilNewsService $news
 
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
 
- 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
 
int $id
 
bool $referenced
 
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 = ""
 
bool $offline = false
 
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 26 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 335 of file class.ilContainer.php.

References $DIC, and $ilDB.

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

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

◆ _exportContainerSettings()

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

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

References ilObject\$log, ILIAS\LTI\ToolProvider\$settings, $target_id, 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(), and ilCourseXMLWriter\start().

363  : void {
364  // container settings
365  $settings = self::_getContainerSettings($a_obj_id);
366  if (count($settings)) {
367  $a_xml->xmlStartTag("ContainerSettings");
368 
369  foreach ($settings as $keyword => $value) {
370  // :TODO: proper custom icon export/import
371  if (stripos($keyword, "icon") !== false) {
372  continue;
373  }
374 
375  $a_xml->xmlStartTag(
376  'ContainerSetting',
377  [
378  'id' => $keyword,
379  ]
380  );
381 
382  $a_xml->xmlData((string) $value);
383  $a_xml->xmlEndTag("ContainerSetting");
384  }
385 
386  $a_xml->xmlEndTag("ContainerSettings");
387  }
388  }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
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 152 of file class.ilContainer.php.

References ilFileUtils\getWebspaceDir().

152  : string
153  {
154  return ilFileUtils::getWebspaceDir() . "/container_data/obj_" . $a_id;
155  }
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 317 of file class.ilContainer.php.

References $DIC, $ilDB, and $res.

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

317  : array
318  {
319  global $DIC;
320 
321  $ilDB = $DIC->database();
322 
323  $res = [];
324 
325  $sql = "SELECT keyword, value FROM container_settings WHERE " .
326  " id = " . $ilDB->quote($a_id, 'integer');
327  $set = $ilDB->query($sql);
328  while ($row = $ilDB->fetchAssoc($set)) {
329  $res[$row["keyword"]] = $row["value"];
330  }
331 
332  return $res;
333  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ _hasContainerSetting()

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

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

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

Referenced by ilObjectDataSet\getTypes().

273  : string {
274  global $DIC;
275 
276  $ilDB = $DIC->database();
277 
278  $q = "SELECT value FROM container_settings WHERE " .
279  " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
280  " keyword = " . $ilDB->quote($a_keyword, 'text');
281  $set = $ilDB->query($q);
282  $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
283 
284  return (bool) $rec;
285  }
global $DIC
Definition: feed.php:28
+ 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 248 of file class.ilContainer.php.

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

Referenced by ilContSkillMemberTableGUI\__construct(), ilContainerByTypeContentGUI\__construct(), ilObjectTileImage\__construct(), ilObjCategoryGUI\__construct(), ilObjContentPageGUI\__construct(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilLocatorGUI\addRepositoryItems(), ilObjectCommonSettingFormAdapter\addTitleIconVisibility(), ilObjectCommonSettingFormAdapter\addTopActionsVisibility(), ilObjWiki\cloneObject(), ilObjSession\cloneSettings(), ilObjContentPage\doCloneObject(), ilObjectTileImage\exists(), ilObjectCustomIconImpl\exists(), ilContSkillMemberTableGUI\fillRow(), ilMailMemberSearchGUI\generateContextArray(), ilTaxonomyClassificationProvider\getActiveTaxonomiesForParentRefId(), ilObjPortfolioTemplateGUI\getEditFormCustomValues(), ilObjExerciseGUI\getEditFormCustomValues(), ilObjContentPageListGUI\getInfoScreenStatus(), ilObjCategoryListGUI\getInfoScreenStatus(), ilCourseMembershipGUI\getMailContextOptions(), ilGroupMembershipGUI\getMailContextOptions(), ilNewsItem\getNewsForRefId(), ilObjCategoryGUI\getObjectMetadataGUI(), ilTaxMDGUI\getSelectableTaxonomies(), ilObjCategoryGUI\getTabs(), ilObjGroupGUI\getTabs(), ilObjCourseGUI\getTabs(), ilObjSessionGUI\getTabs(), ilObjectDataSet\getTypes(), ilObjectMetaDataGUI\hasAdvancedMDSettings(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilContainerGUI\initFilter(), ilContainerGUI\initListPresentationForm(), ilGroupMembershipMailNotification\initMail(), ilCourseMembershipMailNotification\initMail(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilObjectListGUI\insertCommands(), ilObjectGUI\insertHeaderAction(), ilContSkillPresentationGUI\isAccessible(), ilTaggingClassificationProvider\isActive(), ilMembershipNotifications\isActiveForRefId(), ilColumnGUI\isGloballyActivated(), ilObjFileBasedLMAccess\isInfoEnabled(), ilObjContentObjectAccess\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().

252  : string {
253  global $DIC;
254 
255  $ilDB = $DIC->database();
256 
257  $q = "SELECT value FROM container_settings WHERE " .
258  " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
259  " keyword = " . $ilDB->quote($a_keyword, 'text');
260  $set = $ilDB->query($q);
261  $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
262 
263  if (isset($rec['value'])) {
264  return $rec["value"];
265  }
266 
267  return $a_default_value ?? '';
268  }
global $DIC
Definition: feed.php:28
+ 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 287 of file class.ilContainer.php.

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

Referenced by ilObjPortfolioBase\cloneBasics(), ilObjWiki\cloneObject(), ilObjSession\cloneSettings(), ilObjectTileImage\copy(), ilObjectCustomIconImpl\copy(), ilObjTalkTemplate\create(), ilObjectTileImage\createFromImportDir(), ilObjContentPage\doCloneObject(), ilObjectDataSet\getDependencies(), ilObjCategoryGUI\getObjectMetadataGUI(), ilCategoryXmlParser\handlerEndTag(), ilGroupXMLParser\handlerEndTag(), ilCourseXMLParser\handlerEndTag(), ilContentPageDataSet\importRecord(), ilAdvancedMetaDataImporter\importXmlRepresentation(), ilObjectCustomIconImpl\persistIconState(), ilObjectTileImage\persistImageState(), ilObjEmployeeTalkSeries\read(), ilObjectCustomIconImpl\remove(), ilObjExercise\saveData(), ilContainerGUI\saveListPresentation(), ilContSkillAdminGUI\saveSettings(), ilObjectCommonSettingFormAdapter\saveTitleIconVisibility(), ilObjectCommonSettingFormAdapter\saveTopActionsVisibility(), ilObjCourseGUI\updateObject(), ilObjCategoryGUI\updateObject(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilObjectServiceSettingsGUI\updateToolSettings().

291  : void {
292  global $DIC;
293 
294  $ilDB = $DIC->database();
295 
296  $query = "DELETE FROM container_settings WHERE " .
297  "id = " . $ilDB->quote($a_id, 'integer') . " " .
298  "AND keyword = " . $ilDB->quote($a_keyword, 'text');
299  $ilDB->manipulate($query);
300 
302  $log->debug("Write container setting, id: " . $a_id . ", keyword: " . $a_keyword . ", value: " . $a_value);
303 
304  $query = "INSERT INTO container_settings (id, keyword, value) VALUES (" .
305  $ilDB->quote($a_id, 'integer') . ", " .
306  $ilDB->quote($a_keyword, 'text') . ", " .
307  $ilDB->quote($a_value, 'text') .
308  ")";
309 
310  $ilDB->manipulate($query);
311  }
static getLogger(string $a_component_id)
Get component logger.
debug(string $a_message, array $a_context=array())
global $DIC
Definition: feed.php:28
$query
ilLogger $log
+ 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 784 of file class.ilContainer.php.

Referenced by getSubItems().

784  : void
785  {
786  }
+ 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 1025 of file class.ilContainer.php.

Referenced by create().

1030  : void {
1031  if (empty($a_title)) {
1032  $a_title = "NO TITLE";
1033  }
1034 
1035  $this->obj_trans->addLanguage($a_lang, $a_title, $a_desc, (bool) $a_lang_default, true);
1036  $this->obj_trans->save();
1037  }
+ Here is the caller graph for this function:

◆ applyContainerUserFilter()

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

Apply container user filter on objects.

Todo:

this deserves a decentralized general concept (consumers provide object filter types)

move selects to respective components

Exceptions
ilException

Workaround: Only text fields take care of $parser_value being passed through new ilQueryParser($parser_value), thus other fields pass values by setting directly in the ADT objects. This could go to a new bridge.

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

References ilObject\$db, $DIC, $i, ILIAS\LTI\ToolProvider\$key, ilObjectSearchFactory\_getAdvancedMDSearchInstance(), ilObjectSearchFactory\_getAdvancedSearchInstance(), ilDBInterface\fetchAssoc(), filterObjIdsByCopyright(), ilObject\getId(), ilADTFactory\getInstance(), ilAdvancedMDFieldDefinition\getInstance(), ilDBInterface\in(), legacyOnlineFilter(), ilDBInterface\like(), ilQueryParser\QP_COMBINATION_OR, ilDBInterface\queryF(), ilDBInterface\quote(), ilContainerFilterField\STD_FIELD_AUTHOR, ilContainerFilterField\STD_FIELD_COPYRIGHT, ilContainerFilterField\STD_FIELD_DESCRIPTION, ilContainerFilterField\STD_FIELD_KEYWORD, ilContainerFilterField\STD_FIELD_OBJECT_TYPE, ilContainerFilterField\STD_FIELD_ONLINE, ilContainerFilterField\STD_FIELD_TITLE, ilContainerFilterField\STD_FIELD_TITLE_DESCRIPTION, ilContainerFilterField\STD_FIELD_TUTORIAL_SUPPORT, and ilUtil\stripSlashes().

Referenced by getSubItems().

1049  : array {
1050  global $DIC;
1051  $db = $DIC->database();
1052 
1053  if (is_null($container_user_filter)) {
1054  return $objects;
1055  }
1056 
1057  if ($container_user_filter->isEmpty() && !self::_lookupContainerSetting($this->getId(), "filter_show_empty", '0')) {
1058  return [];
1059  }
1060 
1061  $result = null;
1062 
1063  $obj_ids = array_map(static function (array $i): int {
1064  return (int) $i["obj_id"];
1065  }, $objects);
1066  $filter_data = $container_user_filter->getData();
1067  if (is_array($filter_data)) {
1068  foreach ($filter_data as $key => $val) {
1069  if (count($obj_ids) === 0) { // stop if no object ids are left
1070  continue;
1071  }
1072  if (!in_array(substr($key, 0, 4), ["adv_", "std_"], true)) {
1073  continue;
1074  }
1075  if ($val == "") {
1076  continue;
1077  }
1078  $field_id = substr($key, 4);
1079  $val = ilUtil::stripSlashes($val);
1080  $query_parser = new ilQueryParser($val);
1081  if (strpos($key, "std_") === 0) {
1082  // object type
1083  if ((int) $field_id === ilContainerFilterField::STD_FIELD_OBJECT_TYPE) {
1084  $result = null;
1085  $set = $db->queryF(
1086  "SELECT obj_id FROM object_data " .
1087  " WHERE " . $db->in("obj_id", $obj_ids, false, "integer") .
1088  " AND type = %s",
1089  ["text"],
1090  [$val]
1091  );
1092  $result_obj_ids = [];
1093  while ($rec = $db->fetchAssoc($set)) {
1094  $result_obj_ids[] = $rec["obj_id"];
1095  }
1096  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1097  } elseif ((int) $field_id === ilContainerFilterField::STD_FIELD_ONLINE) {
1098  if (in_array($val, [1, 2])) {
1099  $online_where = ($val == 1)
1100  ? " (offline <> " . $db->quote(1, "integer") . " OR offline IS NULL) "
1101  : " offline = " . $db->quote(1, "integer") . " ";
1102  $result = null;
1103  $set = $db->queryF(
1104  "SELECT obj_id FROM object_data " .
1105  " WHERE " . $db->in("obj_id", $obj_ids, false, "integer") .
1106  " AND " . $online_where,
1107  [],
1108  []
1109  );
1110  $result_obj_ids = [];
1111  while ($rec = $db->fetchAssoc($set)) {
1112  $result_obj_ids[] = $rec["obj_id"];
1113  }
1114  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1115  $obj_ids = $this->legacyOnlineFilter($obj_ids, $objects, (int) $val);
1116  }
1117  } elseif ((int) $field_id === ilContainerFilterField::STD_FIELD_TUTORIAL_SUPPORT) {
1118  $result = null;
1119  $set = $db->queryF(
1120  "SELECT DISTINCT(obj_id) FROM obj_members m JOIN usr_data u ON (u.usr_id = m.usr_id) " .
1121  " WHERE " . $db->in("m.obj_id", $obj_ids, false, "integer") .
1122  " AND " . $db->like("u.lastname", "text", $val) .
1123  " AND m.contact = %s",
1124  ["integer"],
1125  [1]
1126  );
1127  $result_obj_ids = [];
1128  while ($rec = $db->fetchAssoc($set)) {
1129  $result_obj_ids[] = $rec["obj_id"];
1130  }
1131  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1132  } elseif ((int) $field_id === ilContainerFilterField::STD_FIELD_COPYRIGHT) {
1133  $obj_ids = $this->filterObjIdsByCopyright($obj_ids, $val);
1134  } else {
1135  #$query_parser->setCombination($this->options['title_ao']);
1136  $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
1137  $query_parser->parse();
1138  $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
1139 
1140  //$meta_search->setFilter($this->filter); // object types ['lm', ...]
1141  switch ($field_id) {
1143  $meta_search->setMode('title_description');
1144  break;
1146  $meta_search->setMode('description');
1147  break;
1149  $meta_search->setMode('title');
1150  break;
1152  $meta_search->setMode('keyword_all');
1153  break;
1155  $meta_search->setMode('contribute');
1156  break;
1157 
1158  }
1159  //$meta_search->setOptions($this->options);
1160  $result = $meta_search->performSearch();
1161  }
1162  } else { // advanced metadata search
1163  $field = ilAdvancedMDFieldDefinition::getInstance((int) $field_id);
1164 
1165  $field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance(
1166  $field->getADTDefinition(),
1167  true,
1168  false
1169  );
1170  $field_form->setElementId("query[" . $key . "]");
1171  $field_form->validate();
1172 
1179  if ($field instanceof ilAdvancedMDFieldDefinitionSelectMulti) {
1180  $field_form->getADT()->setSelections([$val]);
1181  }
1182  if ($field instanceof ilAdvancedMDFieldDefinitionSelect) {
1183  $adt = $field_form->getADT();
1184  if ($adt instanceof ilADTMultiEnumText) {
1185  $field_form->getADT()->setSelections([$val]);
1186  } else {
1187  $field_form->getADT()->setSelection($val);
1188  }
1189  }
1190  if ($field instanceof ilAdvancedMDFieldDefinitionInteger) {
1191  $field_form->getADT()->setNumber((int) $val);
1192  }
1193 
1194  $query_parser->setCombination(ilQueryParser::QP_COMBINATION_OR);
1195  $adv_md_search = ilObjectSearchFactory::_getAdvancedMDSearchInstance($query_parser);
1196  //$adv_md_search->setFilter($this->filter); // this could be set to an array of object types
1197  $adv_md_search->setDefinition($field); // e.g. ilAdvancedMDFieldDefinitionSelectMulti
1198  $adv_md_search->setIdFilter([0]);
1199  $adv_md_search->setSearchElement($field_form); // e.g. ilADTEnumSearchBridgeMulti
1200  $result = $adv_md_search->performSearch();
1201  }
1202 
1203  // intersect results
1204  if ($result instanceof ilSearchResult) {
1205  $result_obj_ids = array_map(
1206  static function (array $i): int {
1207  return (int) $i["obj_id"];
1208  },
1209  $result->getEntries()
1210  );
1211  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1212  }
1213  }
1214  }
1215  $objects = array_filter($objects, static function (array $o) use ($obj_ids): bool {
1216  return in_array($o["obj_id"], $obj_ids);
1217  });
1218 
1219  return $objects;
1220  }
fetchAssoc(ilDBStatement $statement)
like(string $column, string $type, string $value="?", bool $case_insensitive=true)
Generate a like subquery.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
quote($value, string $type)
filterObjIdsByCopyright(array $obj_ids, string $copyright_id)
static getInstance(?int $a_field_id, ?int $a_type=null, string $language='')
global $DIC
Definition: feed.php:28
ilDBInterface $db
string $key
Consumer key/client ID value.
Definition: System.php:193
queryF(string $query, array $types, array $values)
in(string $field, array $values, bool $negate=false, string $type="")
static _getAdvancedSearchInstance(ilQueryParser $query_parser)
static _getAdvancedMDSearchInstance(ilQueryParser $query_parser)
legacyOnlineFilter(array $obj_ids, array $objects, int $val)
Legacy online filter.
$i
Definition: metadata.php:41
+ 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 502 of file class.ilContainer.php.

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

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

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

468  : bool
469  {
470  $ilLog = $this->log;
471 
472  parent::cloneDependencies($target_id, $copy_id);
473 
474  ilContainerSorting::_getInstance($this->getId())->cloneSorting($target_id, $copy_id);
475 
476  // fix internal links to other objects
477  self::fixInternalLinksAfterCopy($target_id, $copy_id, $this->getRefId());
478 
479  // fix item group references in page content
481 
482  $olp = ilObjectLP::getInstance($this->getId());
483  $collection = $olp->getCollectionInstance();
484  if ($collection) {
485  $collection->cloneCollection($target_id, $copy_id);
486  }
487 
488  return true;
489  }
$target_id
Definition: goto.php:52
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 810 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().

810  : int
811  {
812  global $DIC;
813 
814  $lng = $DIC->language();
815 
816  $ret = parent::create();
817 
818  // set translation object, since we have an object id now
819  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
820 
821  // add default translation
822  $this->addTranslation(
823  $this->getTitle(),
824  $this->getDescription(),
826  '1'
827  );
828 
829  if (($this->getStyleSheetId()) > 0) {
830  //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
831  }
832 
834  $log->debug("Create Container, id: " . $this->getId());
835 
836  self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
837  self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) ((int) $this->getNewsTimelineAutoEntries()));
838  self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) $this->getNewsTimelineLandingPage()));
839  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (string) ((int) $this->getNewsBlockActivated()));
840  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (string) ((int) $this->getUseNews()));
841 
842  return $ret;
843  }
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.
debug(string $a_message, array $a_context=array())
global $DIC
Definition: feed.php:28
ilLanguage $lng
static getInstance(int $obj_id)
ilLogger $log
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createContainerDirectory()

ilContainer::createContainerDirectory ( )

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

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

134  : void
135  {
136  $webspace_dir = ilFileUtils::getWebspaceDir();
137  $cont_dir = $webspace_dir . "/container_data";
138  if (!is_dir($cont_dir)) {
139  ilFileUtils::makeDir($cont_dir);
140  }
141  $obj_dir = $cont_dir . "/obj_" . $this->getId();
142  if (!is_dir($obj_dir)) {
143  ilFileUtils::makeDir($obj_dir);
144  }
145  }
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 568 of file class.ilContainer.php.

568  : bool
569  {
570  // always call parent delete function first!!
571  if (!parent::delete()) {
572  return false;
573  }
574  // delete translations
575  $this->obj_trans->delete();
576 
577  return true;
578  }

◆ deleteTranslation()

ilContainer::deleteTranslation ( string  $a_lang)

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

1019  : void
1020  {
1021  $this->obj_trans->removeLanguage($a_lang);
1022  $this->obj_trans->save();
1023  }

◆ enablePageEditing()

ilContainer::enablePageEditing ( )

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

References $ilSetting, and $setting.

799  : bool
800  {
802 
803  // @todo: this will need a more general approach
804  if ($ilSetting->get("enable_cat_page_edit")) {
805  return true;
806  }
807  return false;
808  }
global $ilSetting
Definition: privfeed.php:17
ilSetting $setting

◆ filteredSubtree()

ilContainer::filteredSubtree ( )

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

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

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

Referenced by getInitialSubitems().

613  : bool
614  {
615  if ($this->isClassificationFilterActive() && in_array($this->getType(), ["grp", "crs"])) {
616  return true;
617  }
618  return false;
619  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ filterObjIdsByCopyright()

ilContainer::filterObjIdsByCopyright ( array  $obj_ids,
string  $copyright_id 
)
protected

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

References ilObject\$db, ilMDCopyrightSelectionEntry\createIdentifier(), ilDBInterface\fetchAssoc(), filterObjIdsByDefaultCopyright(), ilMDCopyrightSelectionEntry\getDefault(), ilDBInterface\in(), and ilDBInterface\queryF().

Referenced by applyContainerUserFilter().

1222  : array
1223  {
1224  $identifier = \ilMDCopyrightSelectionEntry::createIdentifier($copyright_id);
1225  $default_identifier = \ilMDCopyrightSelectionEntry::createIdentifier(
1227  );
1228 
1229  if ($identifier === $default_identifier) {
1230  return $this->filterObjIdsByDefaultCopyright($obj_ids, $default_identifier);
1231  }
1232 
1233  $db = $this->db;
1234  $set = $db->queryF(
1235  "SELECT DISTINCT(rbac_id) FROM il_meta_rights " .
1236  " WHERE " . $db->in("rbac_id", $obj_ids, false, "integer") .
1237  " AND description = %s ",
1238  array("text"),
1239  array($identifier)
1240  );
1241  $result_obj_ids = [];
1242  while ($rec = $db->fetchAssoc($set)) {
1243  $result_obj_ids[] = $rec["rbac_id"];
1244  }
1245  return array_intersect($obj_ids, $result_obj_ids);
1246  }
fetchAssoc(ilDBStatement $statement)
filterObjIdsByDefaultCopyright(array $obj_ids, string $default_identifier)
ilDBInterface $db
queryF(string $query, array $types, array $values)
in(string $field, array $values, bool $negate=false, string $type="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ filterObjIdsByDefaultCopyright()

ilContainer::filterObjIdsByDefaultCopyright ( array  $obj_ids,
string  $default_identifier 
)
protected

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

References ilObject\$db, ilDBInterface\fetchAssoc(), ilDBInterface\in(), and ilDBInterface\queryF().

Referenced by filterObjIdsByCopyright().

1251  : array {
1252  /*
1253  * Objects with no entry in il_meta_rights need to be treated like they
1254  * have the default copyright.
1255  */
1256  $db = $this->db;
1257  $set = $db->queryF(
1258  "SELECT DISTINCT(rbac_id) FROM il_meta_rights " .
1259  " WHERE " . $db->in("rbac_id", $obj_ids, false, "integer") .
1260  " AND NOT description = %s ",
1261  array("text"),
1262  array($default_identifier)
1263  );
1264  $filtered_out_obj_ids = [];
1265  while ($rec = $db->fetchAssoc($set)) {
1266  $filtered_out_obj_ids[] = $rec["rbac_id"];
1267  }
1268  return array_diff($obj_ids, $filtered_out_obj_ids);
1269  }
fetchAssoc(ilDBStatement $statement)
ilDBInterface $db
queryF(string $query, array $types, array $values)
in(string $field, array $values, bool $negate=false, string $type="")
+ 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 919 of file class.ilContainer.php.

References $DIC, $ilSetting, ILIAS\LTI\ToolProvider\$key, 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 ilContainerContentGUI\renderItem(), and ilContainerContentGUI\renderItemGroup().

919  : array
920  {
921  global $DIC;
922 
923  $ilSetting = $DIC->settings();
924  $ilObjDataCache = $DIC["ilObjDataCache"];
925 
926  // using long descriptions?
927  $short_desc = $ilSetting->get("rep_shorten_description");
928  $short_desc_max_length = $ilSetting->get("rep_shorten_description_length");
929  if (!$short_desc || $short_desc_max_length > 0) {
930  // using (part of) shortened description
931  if ($short_desc && $short_desc_max_length && $short_desc_max_length < ilObject::DESC_LENGTH) {
932  foreach ($objects as $key => $object) {
933  $objects[$key]["description"] = ilStr::shortenTextExtended(
934  $object["description"],
935  (int) $short_desc_max_length,
936  true
937  );
938  }
939  }
940  // using (part of) long description
941  else {
942  $obj_ids = [];
943  foreach ($objects as $key => $object) {
944  $obj_ids[] = $object["obj_id"];
945  }
946  if (count($obj_ids)) {
948  foreach ($objects as $key => $object) {
949  // #12166 - keep translation, ignore long description
950  if ($ilObjDataCache->isTranslatedDescription((int) $object["obj_id"])) {
951  $long_desc[$object["obj_id"]] = $object["description"];
952  }
953  if ($short_desc && $short_desc_max_length) {
954  $long_desc[$object["obj_id"]] = ilStr::shortenTextExtended(
955  $long_desc[$object["obj_id"]] ?? '',
956  (int) $short_desc_max_length,
957  true
958  );
959  }
960  $objects[$key]["description"] = $long_desc[$object["obj_id"]] ?? '';
961  }
962  }
963  }
964  }
965  return $objects;
966  }
const DESC_LENGTH
global $DIC
Definition: feed.php:28
static getLongDescriptions(array $obj_ids)
string $key
Consumer key/client ID value.
Definition: System.php:193
string $long_desc
global $ilSetting
Definition: privfeed.php:17
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 147 of file class.ilContainer.php.

References ilObject\getId().

147  : string
148  {
149  return self::_getContainerDirectory($this->getId());
150  }
+ Here is the call graph for this function:

◆ getGroupedObjTypes()

ilContainer::getGroupedObjTypes ( )

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

References $obj_definition, and ilObject\getType().

789  : array
790  {
791  $objDefinition = $this->obj_definition;
792 
793  if (empty($this->type_grps)) {
794  $this->type_grps = $objDefinition::getGroupedRepositoryObjectTypes($this->getType());
795  }
796  return $this->type_grps;
797  }
ilObjectDefinition $obj_definition
+ Here is the call graph for this function:

◆ getHiddenFilesFound()

ilContainer::getHiddenFilesFound ( )

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

References $hiddenfilesfound.

163  : bool
164  {
166  }

◆ getInitialSubitems()

ilContainer::getInitialSubitems ( )
protected

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

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

Referenced by getSubItems().

621  : array
622  {
623  $tree = $this->tree;
624  if ($this->filteredSubtree()) {
625  $objects = $tree->getSubTree($tree->getNodeData($this->getRefId()));
626  } else {
627  $objects = $tree->getChilds($this->getRefId(), "title");
628  }
629  return $objects;
630  }
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 233 of file class.ilContainer.php.

References $news_block_activated.

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

233  : bool
234  {
236  }
bool $news_block_activated
+ Here is the caller graph for this function:

◆ getNewsTimeline()

ilContainer::getNewsTimeline ( )

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

References $news_timeline.

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

183  : bool
184  {
185  return $this->news_timeline;
186  }
+ Here is the caller graph for this function:

◆ getNewsTimelineAutoEntries()

ilContainer::getNewsTimelineAutoEntries ( )

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

References $news_timeline_auto_entries.

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

193  : bool
194  {
196  }
bool $news_timeline_auto_entries
+ Here is the caller graph for this function:

◆ getNewsTimelineLandingPage()

ilContainer::getNewsTimelineLandingPage ( )

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

References $news_timeline_landing_page.

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

203  : bool
204  {
206  }
bool $news_timeline_landing_page
+ Here is the caller graph for this function:

◆ getObjectTranslation()

ilContainer::getObjectTranslation ( )

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

References $obj_trans.

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

124  {
125  return $this->obj_trans;
126  }
ilObjectTranslation $obj_trans
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getOrderType()

ilContainer::getOrderType ( )

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

585  : int
586  {
587  return $this->order_type ?: self::SORT_TITLE;
588  }

◆ getStyleSheetId()

ilContainer::getStyleSheetId ( )

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

References $style_id.

Referenced by create().

168  : int
169  {
170  return $this->style_id;
171  }
+ 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 
)

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

References $i, ilObject\$id, ILIAS\LTI\ToolProvider\$key, $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().

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

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

111  : array
112  {
113  $lng = $this->lng;
114  return [
115  self::TILE_SMALL => $lng->txt("cont_tile_size_1"),
116  self::TILE_NORMAL => $lng->txt("cont_tile_size_0"),
117  self::TILE_LARGE => $lng->txt("cont_tile_size_2"),
118  self::TILE_EXTRA_LARGE => $lng->txt("cont_tile_size_3"),
119  self::TILE_FULL => $lng->txt("cont_tile_size_4")
120  ];
121  }
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 243 of file class.ilContainer.php.

References $use_news.

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

243  : bool
244  {
245  return $this->use_news;
246  }
+ Here is the caller graph for this function:

◆ getViewMode()

ilContainer::getViewMode ( )

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

Referenced by ilContainerSessionsContentGUI\initDetails().

580  : int
581  {
582  return self::VIEW_BY_TYPE;
583  }
+ Here is the caller graph for this function:

◆ gotItems()

ilContainer::gotItems ( )

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

772  : bool
773  {
774  if (isset($this->items["_all"]) && is_array($this->items["_all"]) && count($this->items["_all"]) > 0) {
775  return true;
776  }
777  return false;
778  }

◆ isClassificationFilterActive()

ilContainer::isClassificationFilterActive ( )

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

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

Referenced by filteredSubtree(), and getSubItems().

595  : bool
596  {
597  // apply container classification filters
598  $repo = new ilClassificationSessionRepository($this->getRefId());
599  foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
600  $id = get_class($class_provider);
601  $current = $repo->getValueForProvider($id);
602  if ($current) {
603  return true;
604  }
605  }
606  return false;
607  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 208 of file class.ilContainer.php.

References getNewsTimeline(), and getUseNews().

208  : bool
209  {
210  if (!$this->news->isGloballyActivated()) {
211  return false;
212  }
213  if ($this->getUseNews() && $this->getNewsTimeline()) {
214  return true;
215  }
216  return false;
217  }
+ Here is the call graph for this function:

◆ isNewsTimelineLandingPageEffective()

ilContainer::isNewsTimelineLandingPageEffective ( )

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

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

219  : bool
220  {
221  if ($this->getUseNews() && $this->getNewsTimeline() && $this->getNewsTimelineLandingPage()) {
222  return true;
223  }
224  return false;
225  }
+ Here is the call graph for this function:

◆ legacyOnlineFilter()

ilContainer::legacyOnlineFilter ( array  $obj_ids,
array  $objects,
int  $val 
)
protected

Legacy online filter.

This can be removed, once all objects use the central online/offline property

Parameters
int[]$obj_ids
array$objects
int$val
Returns
int[]

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

References $i, ILIAS\LTI\ToolProvider\$key, ilObject\$type, ilObjMediaCastAccess\_lookupOnline(), ilObjDataCollectionAccess\_lookupOnline(), ilObjSurveyQuestionPool\_lookupOnline(), ilObjBookingPoolAccess\_lookupOnlineStatus(), ilObjPortfolioTemplateAccess\_lookupOnlineStatus(), ilObjGlossaryAccess\_lookupOnlineStatus(), ilObjWikiAccess\_lookupOnlineStatus(), and ilObjQuestionPoolAccess\isOnline().

Referenced by applyContainerUserFilter().

1284  : array {
1285  $legacy_types = ["glo", "wiki", "qpl", "book", "dcl", "prtt", "mcst", "spl"];
1286  foreach ($legacy_types as $type) {
1287  $lobjects = array_filter($objects, static function (array $o) use ($type): bool {
1288  return ($o["type"] === $type);
1289  });
1290  $lobj_ids = array_map(static function (array $i): int {
1291  return (int) $i["obj_id"];
1292  }, $lobjects);
1293  $status = [];
1294  switch ($type) {
1295  case "glo":
1296  $status = ilObjGlossaryAccess::_lookupOnlineStatus($lobj_ids);
1297  break;
1298  case "wiki":
1299  $status = ilObjWikiAccess::_lookupOnlineStatus($lobj_ids);
1300  break;
1301  case "book":
1302  $status = ilObjBookingPoolAccess::_lookupOnlineStatus($lobj_ids);
1303  break;
1304  case "qpl":
1305  $status = [];
1306  foreach ($lobj_ids as $lid) {
1307  $status[$lid] = ilObjQuestionPoolAccess::isOnline($lid);
1308  }
1309  break;
1310  case "dcl":
1311  $status = [];
1312  foreach ($lobj_ids as $lid) {
1313  $status[$lid] = ilObjDataCollectionAccess::_lookupOnline($lid);
1314  }
1315  break;
1316  case "prtt":
1318  break;
1319  case "mcst":
1320  foreach ($lobj_ids as $lid) {
1321  $status[$lid] = \ilObjMediaCastAccess::_lookupOnline($lid);
1322  }
1323  break;
1324  case "spl":
1325  foreach ($lobj_ids as $lid) {
1326  $status[$lid] = \ilObjSurveyQuestionPool::_lookupOnline($lid);
1327  }
1328  }
1329  foreach ($status as $obj_id => $online) {
1330  if (($val == 1 && !$online) || ($val == 2 && $online)) {
1331  if (($key = array_search($obj_id, $obj_ids)) !== false) {
1332  unset($obj_ids[$key]);
1333  }
1334  } elseif (!in_array($obj_id, $obj_ids)) {
1335  $obj_ids[] = $obj_id;
1336  }
1337  }
1338  }
1339  return $obj_ids;
1340  }
string $type
static _lookupOnlineStatus(array $a_ids)
string $key
Consumer key/client ID value.
Definition: System.php:193
static _lookupOnlineStatus(array $a_ids)
see legacyOnlineFilter in ilContainer
static isOnline($a_obj_id)
returns the objects&#39;s ONline status
static _lookupOnline(int $a_id)
Check wether datacollection is online.
$i
Definition: metadata.php:41
static _lookupOnlineStatus(array $a_ids)
Check whether booking pool is online (legacy version)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ putInTree()

ilContainer::putInTree ( int  $parent_ref_id)

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

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

Referenced by ilECSCourseCreationHandler\createCourseReference().

845  : void
846  {
847  parent::putInTree($parent_ref_id);
848 
849  // copy title, icon actions visibilities
850  if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_header_icon_and_title")) {
851  self::_writeContainerSetting($this->getId(), "hide_header_icon_and_title", '1');
852  }
853  if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_top_actions")) {
854  self::_writeContainerSetting($this->getId(), "hide_top_actions", '1');
855  }
856  }
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 888 of file class.ilContainer.php.

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

Referenced by ilObjOrgUnit\__construct().

888  : void
889  {
890  parent::read();
891 
893 
894  //$this->setStyleSheetId(ilObjStyleSheet::lookupObjectStyle($this->getId()));
895 
896  $this->readContainerSettings();
897  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
898  }
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 900 of file class.ilContainer.php.

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

Referenced by read().

900  : void
901  {
902  $this->setNewsTimeline((bool) self::_lookupContainerSetting($this->getId(), "news_timeline"));
903  $this->setNewsTimelineAutoEntries((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_incl_auto"));
904  $this->setNewsTimelineLandingPage((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_landing_page"));
905  $this->setNewsBlockActivated((bool) self::_lookupContainerSetting(
906  $this->getId(),
908  $this->setting->get('block_activated_news', '1')
909  ));
910  $this->setUseNews((bool) self::_lookupContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, '1') &&
911  $this->news->isGloballyActivated());
912  }
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 1014 of file class.ilContainer.php.

1014  : void
1015  {
1016  $this->obj_trans->delete();
1017  }

◆ setHiddenFilesFound()

ilContainer::setHiddenFilesFound ( bool  $a_hiddenfilesfound)

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

Referenced by getSubItems().

158  : void
159  {
160  $this->hiddenfilesfound = $a_hiddenfilesfound;
161  }
+ Here is the caller graph for this function:

◆ setNewsBlockActivated()

ilContainer::setNewsBlockActivated ( bool  $a_val)

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

Referenced by readContainerSettings().

228  : void
229  {
230  $this->news_block_activated = $a_val;
231  }
+ Here is the caller graph for this function:

◆ setNewsTimeline()

ilContainer::setNewsTimeline ( bool  $a_val)

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

Referenced by readContainerSettings().

178  : void
179  {
180  $this->news_timeline = $a_val;
181  }
+ Here is the caller graph for this function:

◆ setNewsTimelineAutoEntries()

ilContainer::setNewsTimelineAutoEntries ( bool  $a_val)

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

Referenced by readContainerSettings().

188  : void
189  {
190  $this->news_timeline_auto_entries = $a_val;
191  }
+ Here is the caller graph for this function:

◆ setNewsTimelineLandingPage()

ilContainer::setNewsTimelineLandingPage ( bool  $a_val)

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

Referenced by readContainerSettings().

198  : void
199  {
200  $this->news_timeline_landing_page = $a_val;
201  }
+ Here is the caller graph for this function:

◆ setObjectTranslation()

ilContainer::setObjectTranslation ( ?ilObjectTranslation  $obj_trans)

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

References $obj_trans.

128  : void
129  {
130  $this->obj_trans = $obj_trans;
131  }
ilObjectTranslation $obj_trans

◆ setOrderType()

ilContainer::setOrderType ( int  $a_value)

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

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

590  : void
591  {
592  $this->order_type = $a_value;
593  }
+ Here is the caller graph for this function:

◆ setStyleSheetId()

ilContainer::setStyleSheetId ( int  $a_style_id)

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

173  : void
174  {
175  $this->style_id = $a_style_id;
176  }

◆ setUseNews()

ilContainer::setUseNews ( bool  $a_val)

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

Referenced by readContainerSettings().

238  : void
239  {
240  $this->use_news = $a_val;
241  }
+ Here is the caller graph for this function:

◆ update()

ilContainer::update ( )

Definition at line 858 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().

858  : bool
859  {
860  $ret = parent::update();
861 
863  $log->debug("**5**" . count($this->getObjectTranslation()->getLanguages()));
864 
865  $trans = $this->getObjectTranslation();
866  $trans->setDefaultTitle($this->getTitle());
867  $trans->setDefaultDescription($this->getLongDescription());
868  $trans->save();
869 
871  $log->debug(":::::::::::::::::::::::::::");
872  $log->logStack(10);
873 
874  //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
875 
877  $log->debug("Update Container, id: " . $this->getId());
878 
879  self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
880  self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) (int) $this->getNewsTimelineAutoEntries());
881  self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) ($this->getNewsTimelineLandingPage())));
882  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (string) ((int) $this->getNewsBlockActivated()));
883  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (string) ((int) $this->getUseNews()));
884 
885  return $ret;
886  }
static getLogger(string $a_component_id)
Get component logger.
logStack(?int $a_level=null, string $a_message='')
debug(string $a_message, array $a_context=array())
getLongDescription()
get object long description (stored in object_description)
ilLogger $log
+ 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 65 of file class.ilContainer.php.

◆ $content_style_domain

ILIAS Style Content DomainService ilContainer::$content_style_domain
protected

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

◆ $data_preloaded

bool ilContainer::$data_preloaded = false
static

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

◆ $hiddenfilesfound

bool ilContainer::$hiddenfilesfound = false
protected

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

Referenced by getHiddenFilesFound().

◆ $items

array ilContainer::$items = []

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

◆ $news

ilNewsService ilContainer::$news
protected

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

◆ $news_block_activated

bool ilContainer::$news_block_activated = false
protected

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

Referenced by getNewsBlockActivated().

◆ $news_timeline

bool ilContainer::$news_timeline = false
protected

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

Referenced by getNewsTimeline().

◆ $news_timeline_auto_entries

bool ilContainer::$news_timeline_auto_entries = false
protected

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

Referenced by getNewsTimelineAutoEntries().

◆ $news_timeline_landing_page

bool ilContainer::$news_timeline_landing_page = false
protected

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

Referenced by getNewsTimelineLandingPage().

◆ $obj_definition

ilObjectDefinition ilContainer::$obj_definition
protected

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

Referenced by getGroupedObjTypes(), and getSubItems().

◆ $obj_trans

ilObjectTranslation ilContainer::$obj_trans = null
protected

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

Referenced by getObjectTranslation(), and setObjectTranslation().

◆ $order_type

int ilContainer::$order_type = 0
protected

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

◆ $rbacsystem

ilRbacSystem ilContainer::$rbacsystem
protected

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

◆ $recommended_content_manager

ilRecommendedContentManager ilContainer::$recommended_content_manager
protected

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

◆ $setting

ilSetting ilContainer::$setting
protected

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

Referenced by enablePageEditing().

◆ $style_id

int ilContainer::$style_id = 0
protected

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

Referenced by getStyleSheetId().

◆ $use_news

bool ilContainer::$use_news = false
protected

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

Referenced by getUseNews().

◆ $user

ilObjUser ilContainer::$user
protected

Definition at line 67 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 60 of file class.ilContainer.php.

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_FULL

const ilContainer::TILE_FULL = 4

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_LARGE

const ilContainer::TILE_LARGE = 2

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_NORMAL

const ilContainer::TILE_NORMAL = 0

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

◆ TILE_SMALL

const ilContainer::TILE_SMALL = 1

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ VIEW_ARCHIVE

const ilContainer::VIEW_ARCHIVE = 3

Definition at line 34 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: