ILIAS  release_7 Revision v7.30-3-g800a261c036
ilContainer Class Reference

Class ilContainer. More...

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

Public Member Functions

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

Static Public Member Functions

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

Data Fields

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

Static Public Attributes

static $data_preloaded = false
 

Protected Member Functions

 getInitialSubitems ()
 Get initial subitems. More...
 
 applyContainerUserFilter ($objects, ilContainerUserFilter $container_user_filter=null)
 Apply container user filter on objects. More...
 
 legacyOnlineFilter ($obj_ids, $objects, $val)
 Legacy online filter. More...
 

Protected Attributes

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

Detailed Description

Class ilContainer.

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

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilObject\getId(), ilObjectTranslation\getInstance(), and user().

136  {
137  global $DIC;
138 
139  $this->db = $DIC->database();
140  $this->log = $DIC["ilLog"];
141  $this->access = $DIC->access();
142  $this->error = $DIC["ilErr"];
143  $this->rbacsystem = $DIC->rbac()->system();
144  $this->tree = $DIC->repositoryTree();
145  $this->user = $DIC->user();
146  $this->obj_definition = $DIC["objDefinition"];
147  $this->news = $DIC->news();
148 
149 
150  $this->setting = $DIC["ilSetting"];
151  parent::__construct($a_id, $a_reference);
152  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
153 
154  if ($this->getId() > 0) {
155  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
156  }
157  $this->recommended_content_manager = new ilRecommendedContentManager();
158  }
user()
Definition: user.php:4
getId()
get object id public
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
static getInstance($a_obj_id)
Get instance.
Recommended content manager (business logic)
+ Here is the call graph for this function:

Member Function Documentation

◆ _deleteContainerSettings()

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

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

References $DIC, and $ilDB.

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

463  {
464  global $DIC;
465 
466  $ilDB = $DIC->database();
467 
468  if (!$a_id) {
469  return;
470  }
471 
472  $sql = "DELETE FROM container_settings WHERE " .
473  " id = " . $ilDB->quote($a_id, 'integer');
474  if ($a_keyword) {
475  if (!$a_keyword_like) {
476  $sql .= " AND keyword = " . $ilDB->quote($a_keyword, "text");
477  } else {
478  $sql .= " AND " . $ilDB->like("keyword", "text", $a_keyword);
479  }
480  }
481  $ilDB->manipulate($sql);
482  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _exportContainerSettings()

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

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

References ilContainerSortingSettings\_cloneSettings(), ilPageObject\_exists(), ilObjStyleSheet\_lookupStandard(), ilBlockSetting\cloneSettingsOfBlock(), ilObject\getId(), ilObjectTranslation\getInstance(), ilObjectFactory\getInstanceByObjId(), getNewsBlockActivated(), getNewsTimeline(), getNewsTimelineAutoEntries(), getNewsTimelineLandingPage(), ilObject\getRefId(), getStyleSheetId(), getUseNews(), ilXmlWriter\xmlData(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

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

485  {
486  // container settings
487  $settings = self::_getContainerSettings($a_obj_id);
488  if (sizeof($settings)) {
489  $a_xml->xmlStartTag("ContainerSettings");
490 
491  foreach ($settings as $keyword => $value) {
492  // :TODO: proper custom icon export/import
493  if (stristr($keyword, "icon")) {
494  continue;
495  }
496 
497  $a_xml->xmlStartTag(
498  'ContainerSetting',
499  array(
500  'id' => $keyword,
501  )
502  );
503 
504  $a_xml->xmlData($value);
505  $a_xml->xmlEndTag("ContainerSetting");
506  }
507 
508  $a_xml->xmlEndTag("ContainerSettings");
509  }
510  }
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlData($data, $encode=true, $escape=true)
Writes data.
xmlEndTag($tag)
Writes an endtag.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getContainerDirectory()

static ilContainer::_getContainerDirectory (   $a_id)
static

Get the container directory.

Returns
string container directory

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

References ilUtil\getWebspaceDir().

Referenced by getContainerDirectory().

211  {
212  return ilUtil::getWebspaceDir() . "/container_data/obj_" . $a_id;
213  }
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getContainerSettings()

static ilContainer::_getContainerSettings (   $a_id)
static

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

References $DIC, $ilDB, and $res.

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

445  {
446  global $DIC;
447 
448  $ilDB = $DIC->database();
449 
450  $res = array();
451 
452  $sql = "SELECT * FROM container_settings WHERE " .
453  " id = " . $ilDB->quote($a_id, 'integer');
454  $set = $ilDB->query($sql);
455  while ($row = $ilDB->fetchAssoc($set)) {
456  $res[$row["keyword"]] = $row["value"];
457  }
458 
459  return $res;
460  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupContainerSetting()

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

Lookup a container setting.

Parameters
intcontainer id
stringsetting keyword
Returns
string setting value

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

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

Referenced by ilObjCategoryGUI\__construct(), ilObjectTileImage\__construct(), ilContSkillMemberTableGUI\__construct(), ilContainerByTypeContentGUI\__construct(), ilObjContentPageGUI\__construct(), ilContainerContentGUI\__construct(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilLocatorGUI\addRepositoryItems(), ilObjectCommonSettingFormAdapter\addTitleIconVisibility(), ilObjectCommonSettingFormAdapter\addTopActionsVisibility(), applyContainerUserFilter(), ilObjWiki\cloneObject(), ilObjSession\cloneSettings(), ilContainerGUI\editPageContentObject(), ilContainerGUI\editPageFrameObject(), ilObjectTileImage\exists(), ilObjectCustomIconImpl\exists(), ilContSkillMemberTableGUI\fillRow(), ilContainerGUI\forwardToPageObject(), ilMailMemberSearchGUI\generateContextArray(), ilTaxonomyClassificationProvider\getActiveTaxonomiesForParentRefId(), ilContainerGUI\getContainerPageHTML(), 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(), ilObject\hasAutoRating(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilContainerGUI\initFilter(), ilContainerGUI\initListPresentationForm(), ilCourseMembershipMailNotification\initMail(), ilGroupMembershipMailNotification\initMail(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilContainerGUI\initStylePropertiesForm(), ilObjectListGUI\insertCommands(), ilObjectGUI\insertHeaderAction(), ilContSkillPresentationGUI\isAccessible(), ilTaggingClassificationProvider\isActive(), ilMembershipNotifications\isActiveForRefId(), ilColumnGUI\isGloballyActivated(), ilBadgeHandler\isObjectActive(), ilCalendarSettings\lookupCalendarActivated(), ilCalendarSettings\lookupCalendarContentPresentationEnabled(), ilContentPageDataSet\readData(), ilContSkillAdminGUI\saveCompetenceAssignment(), ilContainerGUI\savePageContentObject(), ilObjCategoryGUI\setEditTabs(), ilObjRootFolderGUI\setTitleAndDescription(), ilContainerGUI\setTitleAndDescription(), ilAdvancedMDRecordObjectOrderings\sortRecords(), and ilObjContentPage\writeStyleSheetId().

396  {
397  global $DIC;
398 
399  $ilDB = $DIC->database();
400 
401  $q = "SELECT * FROM container_settings WHERE " .
402  " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
403  " keyword = " . $ilDB->quote($a_keyword, 'text');
404  $set = $ilDB->query($q);
405  $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
406 
407  if (isset($rec['value'])) {
408  return $rec["value"];
409  }
410  if ($a_default_value === null) {
411  return '';
412  }
413  return $a_default_value;
414  }
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ _writeContainerSetting()

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

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

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

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

422  {
423  global $DIC;
424 
425  $ilDB = $DIC->database();
426 
427  $query = "DELETE FROM container_settings WHERE " .
428  "id = " . $ilDB->quote($a_id, 'integer') . " " .
429  "AND keyword = " . $ilDB->quote($a_keyword, 'text');
430  $res = $ilDB->manipulate($query);
431 
433  $log->debug("Write container setting, id: " . $a_id . ", keyword: " . $a_keyword . ", value: " . $a_value);
434 
435  $query = "INSERT INTO container_settings (id, keyword, value) VALUES (" .
436  $ilDB->quote($a_id, 'integer') . ", " .
437  $ilDB->quote($a_keyword, 'text') . ", " .
438  $ilDB->quote($a_value, 'text') .
439  ")";
440 
441  $res = $ilDB->manipulate($query);
442  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
global $ilDB
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addAdditionalSubItemInformation()

ilContainer::addAdditionalSubItemInformation ( $object)

Add additional information to sub item, e.g.

used in courses for timings information etc.

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

Referenced by getSubItems().

946  {
947  }
+ Here is the caller graph for this function:

◆ addTranslation()

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

Add translation.

Parameters
$a_title
$a_desc
$a_lang
$a_lang_default
Returns
bool

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

Referenced by create().

1234  {
1235  if (empty($a_title)) {
1236  $a_title = "NO TITLE";
1237  }
1238 
1239  $this->obj_trans->addLanguage($a_lang, $a_title, $a_desc, $a_lang_default, true);
1240  $this->obj_trans->save();
1241 
1242  return true;
1243  }
+ Here is the caller graph for this function:

◆ applyContainerUserFilter()

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

Apply container user filter on objects.

Todo:

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

move selects to respective components

Parameters
$objects
ilContainerUserFilter | null$container_user_filter
Returns
array
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. Workaround #2: Subtracting the value by 1 for selects completes the workaround started in ilContainerFilterUtil::getFilterForRefId. This is necessary in R7 since KS selects are confused by the value 0. For R8 this is somehow not a problem.

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

References $db, $DIC, $i, $result, ilObjectSearchFactory\_getAdvancedMDSearchInstance(), ilObjectSearchFactory\_getAdvancedSearchInstance(), _lookupContainerSetting(), ilObject\getId(), ilADTFactory\getInstance(), ilAdvancedMDFieldDefinition\getInstance(), IL_INST_ID, legacyOnlineFilter(), QP_COMBINATION_OR, 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().

1257  {
1258  global $DIC;
1259  $db = $DIC->database();
1260 
1261  if (is_null($container_user_filter)) {
1262  return $objects;
1263  }
1264 
1265  if ($container_user_filter->isEmpty() && !ilContainer::_lookupContainerSetting($this->getId(), "filter_show_empty", false)) {
1266  return [];
1267  }
1268 
1269 
1270  $obj_ids = array_map(function ($i) {
1271  return $i["obj_id"];
1272  }, $objects);
1273  $filter_data = $container_user_filter->getData();
1274  if (is_array($filter_data)) {
1275  foreach ($filter_data as $key => $val) {
1276  if (count($obj_ids) == 0) { // stop if no object ids are left
1277  continue;
1278  }
1279  if (!in_array(substr($key, 0, 4), ["adv_", "std_"])) {
1280  continue;
1281  }
1282  if ($val == "") {
1283  continue;
1284  }
1285  $field_id = substr($key, 4);
1286  $val = ilUtil::stripSlashes($val);
1287  $query_parser = new ilQueryParser($val);
1288  if (substr($key, 0, 4) == "std_") {
1289  // object type
1291  $result = null;
1292  $set = $db->queryF(
1293  "SELECT obj_id FROM object_data " .
1294  " WHERE " . $db->in("obj_id", $obj_ids, false, "integer") .
1295  " AND type = %s",
1296  array("text"),
1297  array($val)
1298  );
1299  $result_obj_ids = [];
1300  while ($rec = $db->fetchAssoc($set)) {
1301  $result_obj_ids[] = $rec["obj_id"];
1302  }
1303  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1304  } elseif ($field_id == ilContainerFilterField::STD_FIELD_ONLINE) {
1305  if (in_array($val, [1, 2])) {
1306  $online_where = ($val == 1)
1307  ? " (offline <> " . $db->quote(1, "integer") . " OR offline IS NULL) "
1308  : " offline = " . $db->quote(1, "integer") . " ";
1309  $result = null;
1310  $set = $db->queryF(
1311  "SELECT obj_id FROM object_data " .
1312  " WHERE " . $db->in("obj_id", $obj_ids, false, "integer") .
1313  " AND " . $online_where,
1314  [],
1315  []
1316  );
1317  $result_obj_ids = [];
1318  while ($rec = $db->fetchAssoc($set)) {
1319  $result_obj_ids[] = $rec["obj_id"];
1320  }
1321  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1322  $obj_ids = $this->legacyOnlineFilter($obj_ids, $objects, $val);
1323  }
1324  } elseif ($field_id == ilContainerFilterField::STD_FIELD_TUTORIAL_SUPPORT) {
1325  $result = null;
1326  $set = $db->queryF(
1327  "SELECT DISTINCT(obj_id) FROM obj_members m JOIN usr_data u ON (u.usr_id = m.usr_id) " .
1328  " WHERE " . $db->in("m.obj_id", $obj_ids, false, "integer") .
1329  " AND " . $db->like("u.lastname", "text", $val) .
1330  " AND m.contact = %s",
1331  array("integer"),
1332  array(1)
1333  );
1334  $result_obj_ids = [];
1335  while ($rec = $db->fetchAssoc($set)) {
1336  $result_obj_ids[] = $rec["obj_id"];
1337  }
1338  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1339  } elseif ($field_id == ilContainerFilterField::STD_FIELD_COPYRIGHT) {
1340  $result = null;
1341  $set = $db->queryF(
1342  "SELECT DISTINCT(rbac_id) FROM il_meta_rights " .
1343  " WHERE " . $db->in("rbac_id", $obj_ids, false, "integer") .
1344  " AND description = %s ",
1345  array("text"),
1346  array('il_copyright_entry__' . IL_INST_ID . '__' . $val)
1347  );
1348  $result_obj_ids = [];
1349  while ($rec = $db->fetchAssoc($set)) {
1350  $result_obj_ids[] = $rec["rbac_id"];
1351  }
1352  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1353  } else {
1354  include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
1355  include_once 'Services/Search/classes/class.ilQueryParser.php';
1356 
1357  #$query_parser->setCombination($this->options['title_ao']);
1358  $query_parser->setCombination(QP_COMBINATION_OR);
1359  $query_parser->parse();
1360  $meta_search = ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
1361 
1362  //$meta_search->setFilter($this->filter); // object types ['lm', ...]
1363  switch ($field_id) {
1367  $meta_search->setMode('title_description');
1368  break;
1370  $meta_search->setMode('keyword_all');
1371  break;
1373  $meta_search->setMode('contribute');
1374  break;
1375 
1376  }
1377  //$meta_search->setOptions($this->options);
1378  $result = $meta_search->performSearch();
1379  }
1380  } else { // advanced metadata search
1381  $field = ilAdvancedMDFieldDefinition::getInstance($field_id);
1382 
1383  $field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance(
1384  $field->getADTDefinition(),
1385  true,
1386  false
1387  );
1388  $field_form->setElementId("query[" . $key . "]");
1389  $field_form->validate();
1390 
1401  if ($field instanceof ilAdvancedMDFieldDefinitionSelectMulti) {
1402  $field_form->getADT()->setSelections([$val - 1]);
1403  }
1404  if ($field instanceof ilAdvancedMDFieldDefinitionSelect) {
1405  $adt = $field_form->getADT();
1406  if ($adt instanceof ilADTMultiEnumText) {
1407  $field_form->getADT()->setSelections([$val - 1]);
1408  } else {
1409  $field_form->getADT()->setSelection($val - 1);
1410  }
1411  }
1412  if ($field instanceof ilAdvancedMDFieldDefinitionInteger) {
1413  $field_form->getADT()->setNumber((int) $val);
1414  }
1415 
1416  include_once 'Services/Search/classes/class.ilQueryParser.php';
1417  include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
1418  $adv_md_search = ilObjectSearchFactory::_getAdvancedMDSearchInstance($query_parser);
1419  //$adv_md_search->setFilter($this->filter); // this could be set to an array of object types
1420  $adv_md_search->setDefinition($field); // e.g. ilAdvancedMDFieldDefinitionSelectMulti
1421  $adv_md_search->setIdFilter(array(0));
1422  $adv_md_search->setSearchElement($field_form); // e.g. ilADTEnumSearchBridgeMulti
1423  $result = $adv_md_search->performSearch();
1424  }
1425 
1426  // intersect results
1427  if ($result instanceof ilSearchResult) {
1428  $result_obj_ids = array_map(
1429  function ($i) {
1430  return $i["obj_id"];
1431  },
1432  $result->getEntries()
1433  );
1434  $obj_ids = array_intersect($obj_ids, $result_obj_ids);
1435  }
1436  }
1437  }
1438  $objects = array_filter($objects, function ($o) use ($obj_ids) {
1439  return in_array($o["obj_id"], $obj_ids);
1440  });
1441 
1442  return $objects;
1443  }
const IL_INST_ID
Definition: constants.php:38
legacyOnlineFilter($obj_ids, $objects, $val)
Legacy online filter.
$result
static _getAdvancedSearchInstance($query_parser)
get reference of ilFulltextAdvancedSearch
static getInstance()
Get singleton.
static _getAdvancedMDSearchInstance($query_parser)
get advanced meta data search instance
const QP_COMBINATION_OR
getId()
get object id public
global $DIC
Definition: goto.php:24
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getInstance($a_field_id, $a_type=null, string $language='')
Get definition instance by type.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
$i
Definition: metadata.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneAllObject()

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

clone all objects according to this container

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

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

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

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

◆ cloneDependencies()

ilContainer::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone object dependencies (container sorting)

public

Parameters
inttarget ref id of new course
intcopy id return bool

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

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

595  {
596  $ilLog = $this->log;
597 
598  parent::cloneDependencies($a_target_id, $a_copy_id);
599 
600  include_once('./Services/Container/classes/class.ilContainerSorting.php');
601  ilContainerSorting::_getInstance($this->getId())->cloneSorting($a_target_id, $a_copy_id);
602 
603  // fix internal links to other objects
604  ilContainer::fixInternalLinksAfterCopy($a_target_id, $a_copy_id, $this->getRefId());
605 
606  // fix item group references in page content
607  include_once("./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
609 
610  include_once('Services/Object/classes/class.ilObjectLP.php');
611  $olp = ilObjectLP::getInstance($this->getId());
612  $collection = $olp->getCollectionInstance();
613  if ($collection) {
614  $collection->cloneCollection($a_target_id, $a_copy_id);
615  }
616 
617  return true;
618  }
getId()
get object id public
static fixContainerItemGroupRefsAfterCloning($a_source_container, $a_copy_id)
Fix container item group references after a container has been cloned.
getRefId()
get reference id public
static _getInstance($a_obj_id)
get instance by obj_id
static getInstance($a_obj_id)
+ Here is the call graph for this function:

◆ create()

ilContainer::create ( )

Create.

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

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

981  {
982  global $DIC;
983 
984  $lng = $DIC->language();
985 
986  $ret = parent::create();
987 
988  // set translation object, since we have an object id now
989  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
990 
991  // add default translation
992  $this->addTranslation(
993  $this->getTitle(),
994  $this->getDescription(),
995  $lng->getDefaultLanguage(),
996  true
997  );
998 
999  if (((int) $this->getStyleSheetId()) > 0) {
1000  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1002  }
1003 
1004  $log = ilLoggerFactory::getLogger("cont");
1005  $log->debug("Create Container, id: " . $this->getId());
1006 
1007  self::_writeContainerSetting($this->getId(), "news_timeline", (int) $this->getNewsTimeline());
1008  self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (int) $this->getNewsTimelineAutoEntries());
1009  self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (int) $this->getNewsTimelineLandingPage());
1010  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
1011  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (int) $this->getNewsBlockActivated());
1012  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (int) $this->getUseNews());
1013 
1014  return $ret;
1015  }
addTranslation($a_title, $a_desc, $a_lang, $a_lang_default)
Add translation.
getNewsTimelineLandingPage()
Get news timline is landing page.
getNewsTimelineAutoEntries()
Get news timeline auto entries.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
getId()
get object id public
getStyleSheetId()
get ID of assigned style sheet object
getNewsTimeline()
Get news timeline.
global $DIC
Definition: goto.php:24
getTitle()
get object title public
getDescription()
get object description
getUseNews()
Get use news.
static getInstance($a_obj_id)
Get instance.
$ret
Definition: parser.php:6
static getLogger($a_component_id)
Get component logger.
getNewsBlockActivated()
Get news block activated.
+ Here is the call graph for this function:

◆ createContainerDirectory()

ilContainer::createContainerDirectory ( )

Create directory for the container.

It is <webspace_dir>/container_data.

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

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

183  {
184  $webspace_dir = ilUtil::getWebspaceDir();
185  $cont_dir = $webspace_dir . "/container_data";
186  if (!is_dir($cont_dir)) {
187  ilUtil::makeDir($cont_dir);
188  }
189  $obj_dir = $cont_dir . "/obj_" . $this->getId();
190  if (!is_dir($obj_dir)) {
191  ilUtil::makeDir($obj_dir);
192  }
193  }
getId()
get object id public
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

◆ delete()

ilContainer::delete ( )

delete category and all related data

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

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

705  {
706  // always call parent delete function first!!
707  if (!parent::delete()) {
708  return false;
709  }
710  // delete translations
711  $this->obj_trans->delete();
712 
713  return true;
714  }

◆ deleteTranslation()

ilContainer::deleteTranslation (   $a_lang)

Delete translation.

Parameters
$a_lang

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

1219  {
1220  $this->obj_trans->removeLanguage($a_lang);
1221  $this->obj_trans->save();
1222  }

◆ enablePageEditing()

ilContainer::enablePageEditing ( )

Check whether page editing is allowed for container.

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

References $ilSetting, and $setting.

968  {
970 
971  // @todo: this will need a more general approach
972  if ($ilSetting->get("enable_cat_page_edit")) {
973  return true;
974  }
975  }
global $ilSetting
Definition: privfeed.php:17

◆ filteredSubtree()

ilContainer::filteredSubtree ( )

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

Returns
bool

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

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

Referenced by getInitialSubitems().

760  : bool
761  {
762  if ($this->isClassificationFilterActive() && in_array($this->getType(), ["grp", "crs"])) {
763  return true;
764  }
765  return false;
766  }
getType()
get object type public
isClassificationFilterActive()
Is classification filter active?
+ 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)

Parameters
array$objects
Returns
array

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

References $DIC, $ilSetting, ilObject\$long_desc, $obj_definition, ilObject\$type, ilPageObject\_exists(), ilCopyWizardOptions\_getInstance(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilObject\DESC_LENGTH, ilPageObjectFactory\getInstance(), ilObject\getLongDescriptions(), and ilUtil\shortenText().

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

1115  {
1116  global $DIC;
1117 
1118  $ilSetting = $DIC->settings();
1119  $ilObjDataCache = $DIC["ilObjDataCache"];
1120  // using long descriptions?
1121  $short_desc = $ilSetting->get("rep_shorten_description");
1122  $short_desc_max_length = $ilSetting->get("rep_shorten_description_length");
1123  if (!$short_desc || $short_desc_max_length > 0) {
1124  // using (part of) shortened description
1125  if ($short_desc && $short_desc_max_length && $short_desc_max_length < ilObject::DESC_LENGTH) {
1126  foreach ($objects as $key => $object) {
1127  $objects[$key]["description"] = ilUtil::shortenText($object["description"], $short_desc_max_length, true);
1128  }
1129  }
1130  // using (part of) long description
1131  else {
1132  $obj_ids = array();
1133  foreach ($objects as $key => $object) {
1134  $obj_ids[] = $object["obj_id"];
1135  }
1136  if (sizeof($obj_ids)) {
1138  foreach ($objects as $key => $object) {
1139  // #12166 - keep translation, ignore long description
1140  if ($ilObjDataCache->isTranslatedDescription($object["obj_id"])) {
1141  $long_desc[$object["obj_id"]] = $object["description"];
1142  }
1143  if ($short_desc && $short_desc_max_length) {
1144  $long_desc[$object["obj_id"]] = ilUtil::shortenText($long_desc[$object["obj_id"]], $short_desc_max_length, true);
1145  }
1146  $objects[$key]["description"] = $long_desc[$object["obj_id"]];
1147  }
1148  }
1149  }
1150  }
1151  return $objects;
1152  }
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static getLongDescriptions(array $a_obj_ids)
Get long description data.
const DESC_LENGTH
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContainerDirectory()

ilContainer::getContainerDirectory ( )

Get the container directory.

Returns
string container directory

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

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

201  {
202  return $this->_getContainerDirectory($this->getId());
203  }
static _getContainerDirectory($a_id)
Get the container directory.
getId()
get object id public
+ Here is the call graph for this function:

◆ getGroupedObjTypes()

ilContainer::getGroupedObjTypes ( )

Get grouped repository object types.

Returns
array array of object types

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

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

955  {
957 
958  if (empty($this->type_grps)) {
959  $this->type_grps = $objDefinition->getGroupedRepositoryObjectTypes($this->getType());
960  }
961  return $this->type_grps;
962  }
getType()
get object type public
+ Here is the call graph for this function:

◆ getHiddenFilesFound()

ilContainer::getHiddenFilesFound ( )

Get Found hidden files (set by getSubItems).

Returns
boolean Found hidden files (set by getSubItems)

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

References $hiddenfilesfound.

231  {
233  }

◆ getInitialSubitems()

ilContainer::getInitialSubitems ( )
protected

Get initial subitems.

Returns
array

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

References $tree, filteredSubtree(), and ilObject\getRefId().

Referenced by getSubItems().

773  : array
774  {
775  $tree = $this->tree;
776  if ($this->filteredSubtree()) {
777  $objects = $tree->getSubTree($tree->getNodeData($this->getRefId()));
778  } else {
779  $objects = $tree->getChilds($this->getRefId(), "title");
780  }
781  return $objects;
782  }
filteredSubtree()
Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs...
getRefId()
get reference id public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNewsBlockActivated()

ilContainer::getNewsBlockActivated ( )

Get news block activated.

Returns
bool news block activated

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

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

363  {
364  return $this->news_block_activated;
365  }
+ Here is the caller graph for this function:

◆ getNewsTimeline()

ilContainer::getNewsTimeline ( )

Get news timeline.

Returns
bool activate news timeline

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

References $news_timeline.

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

267  {
268  return $this->news_timeline;
269  }
+ Here is the caller graph for this function:

◆ getNewsTimelineAutoEntries()

ilContainer::getNewsTimelineAutoEntries ( )

Get news timeline auto entries.

Returns
bool include automatically created entries

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

References $news_timeline_auto_entries.

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

287  {
289  }
+ Here is the caller graph for this function:

◆ getNewsTimelineLandingPage()

ilContainer::getNewsTimelineLandingPage ( )

Get news timline is landing page.

Returns
bool is news timline landing page?

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

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

307  {
308  return $this->news_timeline_landing_page;
309  }
+ Here is the caller graph for this function:

◆ getObjectTranslation()

ilContainer::getObjectTranslation ( )

Get object translation.

Returns
ilObjectTranslation

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

References $obj_trans.

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

165  {
166  return $this->obj_trans;
167  }
+ Here is the caller graph for this function:

◆ getOrderType()

ilContainer::getOrderType ( )

Get order type default implementation.

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

References SORT_TITLE.

728  {
729  return $this->order_type ? $this->order_type : ilContainer::SORT_TITLE;
730  }

◆ getStyleSheetId()

ilContainer::getStyleSheetId ( )

get ID of assigned style sheet object

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

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

239  {
240  return $this->style_id;
241  }
+ Here is the caller graph for this function:

◆ getSubItems()

ilContainer::getSubItems (   $a_admin_panel_enabled = false,
  $a_include_side_block = false,
  $a_get_single = 0,
\ilContainerUserFilter  $container_user_filter = null 
)

Get subitems of container.

Parameters
booladministration panel enabled
boolside blocks enabled
Returns
array

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

References $i, ilObject\$id, $obj_definition, ilObject\$objDefinition, ilObject\$type, ilContainerSorting\_getInstance(), ilObjFileAccess\_isFileHidden(), addAdditionalSubItemInformation(), applyContainerUserFilter(), ilObjectListGUI\CONTEXT_REPOSITORY, ilObject\getId(), getInitialSubitems(), ilObject\getRefId(), ilObject\getType(), ilClassificationProvider\getValidProviders(), isClassificationFilterActive(), and setHiddenFilesFound().

797  {
799 
800  // Caching
801  if (is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
802  !$a_get_single) {
803  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
804  }
805 
806  $objects = $this->getInitialSubitems();
807  $objects = $this->applyContainerUserFilter($objects, $container_user_filter);
808  $objects = self::getCompleteDescriptions($objects);
809 
810  // apply container classification filters
811  $repo = new ilClassificationSessionRepository($this->getRefId());
812  foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
813  $id = get_class($class_provider);
814  $current = $repo->getValueForProvider($id);
815  if ($current) {
816  $class_provider->setSelection($current);
817  $filtered = $class_provider->getFilteredObjects();
818  $objects = array_filter($objects, function ($i) use ($filtered) {
819  return (is_array($filtered) && in_array($i["obj_id"], $filtered));
820  });
821  //if (count($filtered) > 0) {
822  // var_dump($filtered);
823  // echo "<br><br>";
824  // var_dump($objects);
825  // exit;
826  //}
827  }
828  }
829 
830  $found = false;
831  $all_ref_ids = array();
832 
833  if (!self::$data_preloaded) {
834  include_once("./Services/Object/classes/class.ilObjectListGUIPreloader.php");
836  }
837 
838  include_once('Services/Container/classes/class.ilContainerSorting.php');
839  $sort = ilContainerSorting::_getInstance($this->getId());
840 
841  // TODO: check this
842  // get items attached to a session
843  include_once './Modules/Session/classes/class.ilEventItems.php';
844  //$event_items = ilEventItems::_getItemsOfContainer($this->getRefId());
845 
846  $classification_filter_active = $this->isClassificationFilterActive();
847  foreach ($objects as $key => $object) {
848  if ($a_get_single > 0 && $object["child"] != $a_get_single) {
849  continue;
850  }
851 
852  // hide object types in devmode
853  if ($objDefinition->getDevMode($object["type"]) || $object["type"] == "adm"
854  || $object["type"] == "rolf") {
855  continue;
856  }
857 
858  // remove inactive plugins
859  if ($objDefinition->isInactivePlugin($object["type"])) {
860  continue;
861  }
862 
863  // BEGIN WebDAV: Don't display hidden Files, Folders and Categories
864  if (in_array($object['type'], array('file','fold','cat'))) {
865  include_once 'Modules/File/classes/class.ilObjFileAccess.php';
866  if (ilObjFileAccess::_isFileHidden($object['title'])) {
867  $this->setHiddenFilesFound(true);
868  if (!$a_admin_panel_enabled) {
869  continue;
870  }
871  }
872  }
873  // END WebDAV: Don't display hidden Files, Folders and Categories
874 
875  // including event items!
876  if (!self::$data_preloaded) {
877  $preloader->addItem($object["obj_id"], $object["type"], $object["child"]);
878  }
879 
880  // filter out items that are attached to an event
881  // no, see #34701
882  /*if (in_array($object['ref_id'], $event_items) && !$classification_filter_active) {
883  continue;
884  }*/
885 
886  // filter side block items
887  if (!$a_include_side_block && $objDefinition->isSideBlock($object['type'])) {
888  continue;
889  }
890 
891  $all_ref_ids[] = $object["child"];
892  }
893 
894  // data preloader
895  if (!self::$data_preloaded) {
896  $preloader->preload();
897  unset($preloader);
898 
899  self::$data_preloaded = true;
900  }
901 
902  foreach ($objects as $key => $object) {
903  // see above, objects were filtered
904  if (!in_array($object["child"], $all_ref_ids)) {
905  continue;
906  }
907 
908  // group object type groups together (e.g. learning resources)
909  $type = $objDefinition->getGroupOfObj($object["type"]);
910  if ($type == "") {
911  $type = $object["type"];
912  }
913 
914  // this will add activation properties
915  $this->addAdditionalSubItemInformation($object);
916 
917  $this->items[$type][$key] = $object;
918 
919  $this->items["_all"][$key] = $object;
920  if ($object["type"] != "sess") {
921  $this->items["_non_sess"][$key] = $object;
922  }
923  }
924  $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]
925  = $sort->sortItems($this->items);
926 
927  return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
928  }
static getValidProviders($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type)
Get all valid providers (for parent container)
static _isFileHidden($a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user. ...
setHiddenFilesFound($a_hiddenfilesfound)
Set Found hidden files (set by getSubItems).
Preloader for object list GUIs.
getId()
get object id public
getType()
get object type public
applyContainerUserFilter($objects, ilContainerUserFilter $container_user_filter=null)
Apply container user filter on objects.
addAdditionalSubItemInformation(&$object)
Add additional information to sub item, e.g.
getRefId()
get reference id public
isClassificationFilterActive()
Is classification filter active?
static _getInstance($a_obj_id)
get instance by obj_id
getInitialSubitems()
Get initial subitems.
$i
Definition: metadata.php:24
+ Here is the call graph for this function:

◆ getUseNews()

ilContainer::getUseNews ( )

Get use news.

Returns
bool use news system?

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

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

383  {
384  return $this->use_news;
385  }
+ Here is the caller graph for this function:

◆ getViewMode()

ilContainer::getViewMode ( )

Get container view mode.

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

References VIEW_BY_TYPE.

Referenced by ilContainerSessionsContentGUI\prepareSessionPresentationLimitation().

720  {
722  }
+ Here is the caller graph for this function:

◆ gotItems()

ilContainer::gotItems ( )

Check whether we got any items.

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

934  {
935  if (is_array($this->items["_all"]) && count($this->items["_all"]) > 0) {
936  return true;
937  }
938  return false;
939  }

◆ isClassificationFilterActive()

ilContainer::isClassificationFilterActive ( )

Is classification filter active?

Returns
bool

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

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

Referenced by filteredSubtree(), and getSubItems().

741  : bool
742  {
743  // apply container classification filters
744  $repo = new ilClassificationSessionRepository($this->getRefId());
745  foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
746  $id = get_class($class_provider);
747  $current = $repo->getValueForProvider($id);
748  if ($current) {
749  return true;
750  }
751  }
752  return false;
753  }
static getValidProviders($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type)
Get all valid providers (for parent container)
getId()
get object id public
getType()
get object type public
getRefId()
get reference id public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isNewsTimelineEffective()

ilContainer::isNewsTimelineEffective ( )

Is news timeline effective?

Returns
bool

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

References getNewsTimeline(), and getUseNews().

317  {
318  if (!$this->news->isGloballyActivated()) {
319  return false;
320  }
321  if ($this->getUseNews()) {
322  if ($this->getNewsTimeline()) {
323  return true;
324  }
325  }
326  return false;
327  }
getNewsTimeline()
Get news timeline.
getUseNews()
Get use news.
+ Here is the call graph for this function:

◆ isNewsTimelineLandingPageEffective()

ilContainer::isNewsTimelineLandingPageEffective ( )

Is news timeline landing page effective?

Returns
bool

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

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

335  {
336  if ($this->getUseNews()) {
337  if ($this->getNewsTimeline()) {
338  if ($this->getNewsTimelineLandingPage()) {
339  return true;
340  }
341  }
342  }
343  return false;
344  }
getNewsTimelineLandingPage()
Get news timline is landing page.
getNewsTimeline()
Get news timeline.
getUseNews()
Get use news.
+ Here is the call graph for this function:

◆ legacyOnlineFilter()

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

Legacy online filter.

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

Parameters
$obj_ids
$objects
$val
Returns
mixed

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

References $i, ilObject\$type, ilObjDataCollectionAccess\_lookupOnline(), ilObjPortfolioTemplateAccess\_lookupOnlineStatus(), ilObjBookingPoolAccess\_lookupOnlineStatus(), ilObjGlossaryAccess\_lookupOnlineStatus(), ilObjWikiAccess\_lookupOnlineStatus(), and ilObjQuestionPoolAccess\isOnline().

Referenced by applyContainerUserFilter().

1456  {
1457  $legacy_types = ["glo", "wiki", "qpl", "book", "dcl", "prtt"];
1458  foreach ($legacy_types as $type) {
1459  $lobjects = array_filter($objects, function ($o) use ($type) {
1460  return ($o["type"] == $type);
1461  });
1462  $lobj_ids = array_map(function ($i) {
1463  return $i["obj_id"];
1464  }, $lobjects);
1465  switch ($type) {
1466  case "glo":
1467  $status = ilObjGlossaryAccess::_lookupOnlineStatus($lobj_ids);
1468  break;
1469  case "wiki":
1470  $status = ilObjWikiAccess::_lookupOnlineStatus($lobj_ids);
1471  break;
1472  case "book":
1473  $status = ilObjBookingPoolAccess::_lookupOnlineStatus($lobj_ids);
1474  break;
1475  case "qpl":
1476  $status = [];
1477  foreach ($lobj_ids as $lid) {
1478  $status[$lid] = ilObjQuestionPoolAccess::isOnline($lid);
1479  }
1480  break;
1481  case "dcl":
1482  $status = [];
1483  foreach ($lobj_ids as $lid) {
1484  $status[$lid] = ilObjDataCollectionAccess::_lookupOnline($lid);
1485  }
1486  break;
1487  case "prtt":
1489  break;
1490  }
1491  foreach ($status as $obj_id => $online) {
1492  if ($val == 1 && !$online || $val == 2 && $online) {
1493  if (($key = array_search($obj_id, $obj_ids)) !== false) {
1494  unset($obj_ids[$key]);
1495  }
1496  } elseif (!in_array($obj_id, $obj_ids)) {
1497  $obj_ids[] = $obj_id;
1498  }
1499  }
1500  }
1501 
1502  return $obj_ids;
1503  }
static _lookupOnline($a_id)
Check wether datacollection is online.
static _lookupOnlineStatus($a_ids)
Check wether learning module is online (legacy version)
static _lookupOnlineStatus($a_ids)
Check wether booking pool is online (legacy version)
static _lookupOnlineStatus($a_ids)
Check wether booking pool is online (legacy version)
static _lookupOnlineStatus($a_ids)
Check wether learning module is online (legacy version)
static isOnline($a_obj_id)
returns the objects&#39;s ONline status
$i
Definition: metadata.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ putInTree()

ilContainer::putInTree (   $a_parent_ref)

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

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

1021  {
1022  parent::putInTree($a_parent_ref);
1023 
1024  // copy title, icon actions visibilities
1025  if (self::_lookupContainerSetting(ilObject::_lookupObjId($a_parent_ref), "hide_header_icon_and_title")) {
1026  self::_writeContainerSetting($this->getId(), "hide_header_icon_and_title", true);
1027  }
1028  if (self::_lookupContainerSetting(ilObject::_lookupObjId($a_parent_ref), "hide_top_actions")) {
1029  self::_writeContainerSetting($this->getId(), "hide_top_actions", true);
1030  }
1031  }
getId()
get object id public
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ read()

ilContainer::read ( )

read

public

Parameters

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

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

Referenced by ilObjOrgUnit\__construct().

1070  {
1071  parent::read();
1072 
1073  include_once("./Services/Container/classes/class.ilContainerSortingSettings.php");
1075 
1076  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1078 
1079  $this->readContainerSettings();
1080  $this->obj_trans = ilObjectTranslation::getInstance($this->getId());
1081  }
setStyleSheetId($a_style_id)
set ID of assigned style sheet object
static lookupObjectStyle($a_obj_id)
Lookup object style.
getId()
get object id public
readContainerSettings()
Read container settings.
setOrderType($a_value)
static getInstance($a_obj_id)
Get instance.
static _lookupSortMode($a_obj_id)
lookup sort mode
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readContainerSettings()

ilContainer::readContainerSettings ( )

Read container settings.

Parameters

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

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

Referenced by read().

1090  {
1091  $this->setNewsTimeline(self::_lookupContainerSetting($this->getId(), "news_timeline"));
1092  $this->setNewsTimelineAutoEntries(self::_lookupContainerSetting($this->getId(), "news_timeline_incl_auto"));
1093  $this->setNewsTimelineLandingPage(self::_lookupContainerSetting($this->getId(), "news_timeline_landing_page"));
1094  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
1095  $this->setNewsBlockActivated(self::_lookupContainerSetting(
1096  $this->getId(),
1098  $this->setting->get('block_activated_news', true)
1099  ));
1100  $this->setUseNews(
1101  self::_lookupContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, true)
1102  && $this->news->isGloballyActivated()
1103  );
1104  }
setNewsTimelineAutoEntries($a_val)
Set news timeline auto entries.
setNewsBlockActivated($a_val)
Set news block activated.
setUseNews($a_val)
Set use news.
setNewsTimelineLandingPage($a_val)
Set news timline is landing page.
getId()
get object id public
setNewsTimeline($a_val)
Set news timeline.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeTranslations()

ilContainer::removeTranslations ( )

Remove all translations of container.

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

1209  {
1210  $this->obj_trans->delete();
1211  }

◆ setHiddenFilesFound()

ilContainer::setHiddenFilesFound (   $a_hiddenfilesfound)

Set Found hidden files (set by getSubItems).

Parameters
boolean$a_hiddenfilesfoundFound hidden files (set by getSubItems)

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

Referenced by getSubItems().

221  {
222  $this->hiddenfilesfound = $a_hiddenfilesfound;
223  }
+ Here is the caller graph for this function:

◆ setNewsBlockActivated()

ilContainer::setNewsBlockActivated (   $a_val)

Set news block activated.

Parameters
bool$a_valnews block activated

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

Referenced by readContainerSettings().

353  {
354  $this->news_block_activated = $a_val;
355  }
+ Here is the caller graph for this function:

◆ setNewsTimeline()

ilContainer::setNewsTimeline (   $a_val)

Set news timeline.

Parameters
bool$a_valactivate news timeline

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

Referenced by readContainerSettings().

257  {
258  $this->news_timeline = $a_val;
259  }
+ Here is the caller graph for this function:

◆ setNewsTimelineAutoEntries()

ilContainer::setNewsTimelineAutoEntries (   $a_val)

Set news timeline auto entries.

Parameters
bool$a_valinclude automatically created entries

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

Referenced by readContainerSettings().

277  {
278  $this->news_timeline_auto_entries = $a_val;
279  }
+ Here is the caller graph for this function:

◆ setNewsTimelineLandingPage()

ilContainer::setNewsTimelineLandingPage (   $a_val)

Set news timline is landing page.

Parameters
bool$a_valis news timline landing page?

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

Referenced by readContainerSettings().

297  {
298  $this->news_timeline_landing_page = $a_val;
299  }
+ Here is the caller graph for this function:

◆ setObjectTranslation()

ilContainer::setObjectTranslation ( ilObjectTranslation  $obj_trans)

Get object translation.

Parameters
ilObjectTranslation$obj_trans

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

References $obj_trans.

174  {
175  $this->obj_trans = $obj_trans;
176  }

◆ setOrderType()

ilContainer::setOrderType (   $a_value)

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

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

733  {
734  $this->order_type = $a_value;
735  }
+ Here is the caller graph for this function:

◆ setStyleSheetId()

ilContainer::setStyleSheetId (   $a_style_id)

set ID of assigned style sheet object

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

Referenced by read().

247  {
248  $this->style_id = $a_style_id;
249  }
+ Here is the caller graph for this function:

◆ setUseNews()

ilContainer::setUseNews (   $a_val)

Set use news.

Parameters
bool$a_valuse news system?

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

Referenced by readContainerSettings().

373  {
374  $this->use_news = $a_val;
375  }
+ Here is the caller graph for this function:

◆ update()

ilContainer::update ( )

Update.

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

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

1037  {
1038  $ret = parent::update();
1039 
1040  $trans = $this->getObjectTranslation();
1041  $trans->setDefaultTitle($this->getTitle());
1042  $trans->setDefaultDescription($this->getLongDescription());
1043  $trans->save();
1044 
1045  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1047 
1048  $log = ilLoggerFactory::getLogger("cont");
1049  $log->debug("Update Container, id: " . $this->getId());
1050 
1051  self::_writeContainerSetting($this->getId(), "news_timeline", (int) $this->getNewsTimeline());
1052  self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (int) $this->getNewsTimelineAutoEntries());
1053  self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (int) $this->getNewsTimelineLandingPage());
1054  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
1055  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::NEWS_VISIBILITY, (int) $this->getNewsBlockActivated());
1056  self::_writeContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, (int) $this->getUseNews());
1057 
1058  return $ret;
1059  }
getNewsTimelineLandingPage()
Get news timline is landing page.
getNewsTimelineAutoEntries()
Get news timeline auto entries.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
getId()
get object id public
getStyleSheetId()
get ID of assigned style sheet object
getNewsTimeline()
Get news timeline.
getTitle()
get object title public
getObjectTranslation()
Get object translation.
getUseNews()
Get use news.
$ret
Definition: parser.php:6
getLongDescription()
get object long description (stored in object_description)
static getLogger($a_component_id)
Get component logger.
getNewsBlockActivated()
Get news block activated.
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilContainer::$access
protected

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

Referenced by cloneAllObject().

◆ $data_preloaded

ilContainer::$data_preloaded = false
static

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

◆ $db

◆ $error

ilContainer::$error
protected

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

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

◆ $hiddenfilesfound

ilContainer::$hiddenfilesfound = false
protected

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

Referenced by getHiddenFilesFound().

◆ $log

◆ $news

ilContainer::$news
protected

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

◆ $news_timeline

ilContainer::$news_timeline = false
protected

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

Referenced by getNewsTimeline().

◆ $news_timeline_auto_entries

ilContainer::$news_timeline_auto_entries = false
protected

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

Referenced by getNewsTimelineAutoEntries().

◆ $obj_definition

ilContainer::$obj_definition
protected

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

Referenced by getCompleteDescriptions(), getGroupedObjTypes(), and getSubItems().

◆ $obj_trans

ilContainer::$obj_trans = null
protected

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

Referenced by getObjectTranslation(), and setObjectTranslation().

◆ $order_type

ilContainer::$order_type = 0
protected

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

◆ $rbacsystem

ilContainer::$rbacsystem
protected

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

Referenced by cloneAllObject().

◆ $recommended_content_manager

ilContainer::$recommended_content_manager
protected

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

◆ $setting

ilContainer::$setting
protected

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

Referenced by enablePageEditing().

◆ $tree

◆ $user

ilContainer::$user
protected

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

Referenced by cloneAllObject().

◆ SORT_ACTIVATION

◆ SORT_CREATION

◆ SORT_DIRECTION_ASC

◆ SORT_DIRECTION_DESC

const ilContainer::SORT_DIRECTION_DESC = 1

◆ SORT_INHERIT

◆ SORT_MANUAL

◆ SORT_NEW_ITEMS_ORDER_ACTIVATION

◆ SORT_NEW_ITEMS_ORDER_CREATION

◆ SORT_NEW_ITEMS_ORDER_TITLE

◆ SORT_NEW_ITEMS_POSITION_BOTTOM

◆ SORT_NEW_ITEMS_POSITION_TOP

◆ SORT_TITLE

◆ VIEW_ARCHIVE

const ilContainer::VIEW_ARCHIVE = 3

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

◆ VIEW_BY_TYPE

◆ VIEW_DEFAULT

const ilContainer::VIEW_DEFAULT = self::VIEW_BY_TYPE

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

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

◆ VIEW_INHERIT

◆ VIEW_OBJECTIVE

◆ VIEW_SESSIONS

◆ VIEW_SIMPLE

◆ VIEW_TIMING


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