ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilContainer Class Reference

Class ilContainer. More...

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

Public Member Functions

 getTileSizes ()
 
 getObjectTranslation ()
 
 setObjectTranslation (?Translations $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 ()
 note: title, description and type should be set when this function is called More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 update ()
 
 read ()
 
 readContainerSettings ()
 
 removeTranslations ()
 
 deleteTranslation (string $a_lang)
 
 addTranslation (string $a_title, string $a_desc, string $a_lang, string $a_lang_default)
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id, int $new_obj_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

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

Data Fields

const VIEW_SESSIONS = 0
 
const VIEW_OBJECTIVE = 1
 
const VIEW_TIMING = 2
 
const VIEW_ARCHIVE = 3
 
const VIEW_SIMPLE = 4
 
const VIEW_BY_TYPE = 5
 
const VIEW_INHERIT = 6
 
const VIEW_DEFAULT = self::VIEW_BY_TYPE
 
const SORT_TITLE = 0
 
const SORT_MANUAL = 1
 
const SORT_ACTIVATION = 2
 
const SORT_INHERIT = 3
 
const SORT_CREATION = 4
 
const SORT_DIRECTION_ASC = 0
 
const SORT_DIRECTION_DESC = 1
 
const SORT_NEW_ITEMS_POSITION_TOP = 0
 
const SORT_NEW_ITEMS_POSITION_BOTTOM = 1
 
const SORT_NEW_ITEMS_ORDER_TITLE = 0
 
const SORT_NEW_ITEMS_ORDER_CREATION = 1
 
const SORT_NEW_ITEMS_ORDER_ACTIVATION = 2
 
const TILE_NORMAL = 0
 
const TILE_SMALL = 1
 
const TILE_LARGE = 2
 
const TILE_EXTRA_LARGE = 3
 
const TILE_FULL = 4
 
array $items = []
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Static Public Attributes

static bool $data_preloaded = false
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

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 30 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 340 of file class.ilContainer.php.

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

Referenced by ILIAS\ILIASObject\Properties\AdditionalProperties\Icon\Custom\delete(), ilObjCategoryGUI\hideTaxAsSideBlockObject(), and ilObjCategoryGUI\updateObject().

+ Here is the caller graph for this function:

◆ _exportContainerSettings()

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

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

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

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

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

+ 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 157 of file class.ilContainer.php.

157 : string
158 {
159 return ilFileUtils::getWebspaceDir() . "/container_data/obj_" . $a_id;
160 }
static getWebspaceDir(string $mode="filesystem")
get webspace directory

References ilFileUtils\getWebspaceDir().

Referenced by getContainerDirectory().

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

◆ _getContainerSettings()

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

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

322 : array
323 {
324 global $DIC;
325
326 $ilDB = $DIC->database();
327
328 $res = [];
329
330 $sql = "SELECT keyword, value FROM container_settings WHERE " .
331 " id = " . $ilDB->quote($a_id, 'integer');
332 $set = $ilDB->query($sql);
333 while ($row = $ilDB->fetchAssoc($set)) {
334 $res[$row["keyword"]] = $row["value"];
335 }
336
337 return $res;
338 }
$res
Definition: ltiservices.php:69

References $DIC, $ilDB, and $res.

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

+ Here is the caller graph for this function:

◆ _hasContainerSetting()

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

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

278 : string {
279 global $DIC;
280
281 $ilDB = $DIC->database();
282
283 $q = "SELECT value FROM container_settings WHERE " .
284 " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
285 " keyword = " . $ilDB->quote($a_keyword, 'text');
286 $set = $ilDB->query($q);
287 $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
288
289 return (bool) $rec;
290 }
const FETCHMODE_ASSOC
$q
Definition: shib_logout.php:25

◆ _lookupContainerSetting()

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

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

257 : string {
258 global $DIC;
259
260 $ilDB = $DIC->database();
261
262 $q = "SELECT value FROM container_settings WHERE " .
263 " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
264 " keyword = " . $ilDB->quote($a_keyword, 'text');
265 $set = $ilDB->query($q);
266 $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
267
268 if (isset($rec['value'])) {
269 return $rec["value"];
270 }
271
272 return $a_default_value ?? '';
273 }

Referenced by ilObjCategoryGUI\__construct(), ILIAS\Container\Content\ItemBlock\ItemBlockSequenceGenerator\__construct(), ilObjContentPageGUI\__construct(), ILIAS\Container\Skills\ContSkillMemberTableBuilder\activeAction(), ilLocatorGUI\addRepositoryItems(), ILIAS\Container\Content\ItemSetManager\applyUserFilter(), ILIAS\Container\Skills\ContSkillMemberTableBuilder\build(), ilObjWiki\cloneObject(), ilObjSession\cloneSettings(), ilObjContentPage\doCloneObject(), ILIAS\ILIASObject\Properties\AdditionalProperties\Icon\Custom\exists(), ilMailMemberSearchGUI\generateContextArray(), ilTaxonomyClassificationProvider\getActiveTaxonomiesForParentRefId(), ilObjExerciseGUI\getEditFormCustomValues(), ILIAS\ILIASObject\Properties\AdditionalProperties\LegacyRepository\getHeaderActionVisibility(), ilObjCategoryListGUI\getInfoScreenStatus(), ilObjContentPageListGUI\getInfoScreenStatus(), ILIAS\ILIASObject\Properties\AdditionalProperties\LegacyRepository\getInfoTabVisibility(), ilCourseMembershipGUI\getMailContextOptions(), ilGroupMembershipGUI\getMailContextOptions(), ILIAS\News\Domain\NewsCollectionService\getNewsForContainer(), ilTaxMDGUI\getSelectableTaxonomies(), ilObjCourseGUI\getTabs(), ilObjGroupGUI\getTabs(), ilObjSessionGUI\getTabs(), ILIAS\ILIASObject\Properties\AdditionalProperties\LegacyRepository\getTitleAndIconVisibility(), ilObjectMetaDataGUI\hasAdvancedMDSettings(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilContainerGUI\initFilter(), ilContainerGUI\initListPresentationForm(), ilCourseMembershipMailNotification\initMail(), ilGroupMembershipMailNotification\initMail(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilObjectGUI\insertHeaderAction(), ilContSkillPresentationGUI\isAccessible(), ILIAS\Taxonomy\Settings\SettingsManager\isActivated(), ilMembershipNotifications\isActiveForRefId(), ilObjFileBasedLMAccess\isInfoEnabled(), ilObjContentObjectAccess\isInfoEnabled(), ilCalendarSettings\lookupCalendarActivated(), ilCalendarSettings\lookupCalendarContentPresentationEnabled(), ilContainerRenderer\renderHelperGeneric(), ilContSkillAdminGUI\saveCompetenceAssignment(), ilObject\selfOrParentWithRatingEnabled(), ilObjCategoryGUI\setEditTabs(), ilContainerGUI\setTitleAndDescription(), ilObjRootFolderGUI\setTitleAndDescription(), ILIAS\News\Aggregation\SubtreeAggregationStrategy\shouldSkip(), ilContainerGUI\showContainerFilter(), and ilAdvancedMDRecordObjectOrderings\sortRecords().

+ 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 292 of file class.ilContainer.php.

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

Referenced by ilObjPortfolioBase\cloneBasics(), ilObjWiki\cloneObject(), ilObjSession\cloneSettings(), ILIAS\ILIASObject\Properties\AdditionalProperties\Icon\Custom\copy(), ilObjTalkTemplate\create(), ilObjContentPage\doCloneObject(), ilLearningSequenceXMLParser\handleEndTag(), ilCategoryXmlParser\handlerEndTag(), ilCourseXMLParser\handlerEndTag(), ilGroupXMLParser\handlerEndTag(), ilContentPageDataSet\importRecord(), ilAdvancedMetaDataImporter\importXmlRepresentation(), ILIAS\ILIASObject\Properties\AdditionalProperties\Icon\Custom\persistIconState(), ILIAS\ILIASObject\Properties\AdditionalProperties\Icon\Custom\remove(), ILIAS\Repository\Form\saveAdditionalFeatures(), ilContainerGUI\saveListPresentation(), ilContSkillAdminGUI\saveSettings(), ilObjCategoryGUI\showTaxAsSideBlockObject(), ILIAS\ILIASObject\Properties\AdditionalProperties\LegacyRepository\storeHeaderActionVisibility(), ILIAS\ILIASObject\Properties\AdditionalProperties\LegacyRepository\storeInfoTabVisibility(), ILIAS\ILIASObject\Properties\AdditionalProperties\LegacyRepository\storeTitleAndIconVisibility(), ilObjCategoryGUI\updateObject(), ilObjCourseGUI\updateObject(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ 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.

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

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

799 : void
800 {
801 }

◆ addTranslation()

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

Reimplemented in ilObjOrgUnit, and ilObjRootFolder.

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

1053 : void {
1054 if (empty($a_title)) {
1055 $a_title = "NO TITLE";
1056 }
1057
1058 $this->obj_trans = $this->obj_trans->withLanguage(
1059 new Language(
1060 $a_lang,
1061 $a_title,
1062 $a_desc,
1063 (bool) $a_lang_default
1064 )
1065 );
1066 $this->getObjectProperties()->storePropertyTranslations($this->obj_trans);
1067 }

◆ applyContainerUserFilter()

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

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

1072 : array {
1073 $filter = $this->domain->content()->filter(
1074 $objects,
1075 $container_user_filter,
1076 !self::_lookupContainerSetting($this->getId(), "filter_show_empty", false)
1077 );
1078 return $filter->apply();
1079 }

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

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

◆ cloneDependencies()

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

Clone object dependencies (container sorting)

@access public

Parameters
inttarget ref id of new course
intcopy id return bool

Reimplemented from ilObject.

Reimplemented in ilObjGroup, ilObjCategory, ilObjCourse, and ilObjFolder.

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

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

References $log, ilContainerSorting\_getInstance(), ilObjItemGroup\fixContainerItemGroupRefsAfterCloning(), ILIAS\Survey\Mode\getId(), and ilObjectLP\getInstance().

+ Here is the call graph for this function:

◆ create()

ilContainer::create ( )

note: title, description and type should be set when this function is called

Reimplemented from ilObject.

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

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

825 : int
826 {
827 global $DIC;
828
829 $lng = $DIC->language();
830
831 $ret = parent::create();
832
833 // set translation object, since we have an object id now
834 $this->obj_trans = $this->getObjectProperties()->getPropertyTranslations();
835
836 // add default translation
837 $this->addTranslation(
838 $this->getTitle(),
839 $this->getLongDescription(),
841 '1'
842 );
843
844 if (($this->getStyleSheetId()) > 0) {
845 //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
846 }
847
849 $log->debug("Create Container, id: " . $this->getId());
850
851 self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
852 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) ((int) $this->getNewsTimelineAutoEntries()));
853 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) $this->getNewsTimelineLandingPage()));
856
857 return $ret;
858 }
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
addTranslation(string $a_title, string $a_desc, string $a_lang, string $a_lang_default)
getDefaultLanguage()
Return default language.
ilLanguage $lng
getLongDescription()
get object long description (stored in object_description)

References $DIC, $lng, $log, ILIAS\Survey\Mode\getId(), ilLoggerFactory\getLogger(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, and ilObjectServiceSettingsGUI\USE_NEWS.

+ Here is the call graph for this function:

◆ createContainerDirectory()

ilContainer::createContainerDirectory ( )

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

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

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

+ 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

Reimplemented from ilObject.

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

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

578 : bool
579 {
580 // always call parent delete function first!!
581 if (!parent::delete()) {
582 return false;
583 }
584 // delete translations
585 $this->getObjectProperties()->deletePropertyTranslations();
586
587 // delete content page
588 $this->domain->page($this)->deletePage();
589
590 return true;
591 }

◆ deleteTranslation()

ilContainer::deleteTranslation ( string  $a_lang)

Reimplemented in ilObjOrgUnit, and ilObjRootFolder.

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

1042 : void
1043 {
1044 $this->obj_trans = $this->obj_trans->withoutLanguage($a_lang);
1045 $this->getObjectProperties()->storePropertyTranslations($this->obj_trans);
1046 }

◆ enablePageEditing()

ilContainer::enablePageEditing ( )

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

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

References $ilSetting.

◆ filteredSubtree()

ilContainer::filteredSubtree ( )

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

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

626 : bool
627 {
628 if ($this->isClassificationFilterActive() && in_array($this->getType(), ["grp", "crs"])) {
629 return true;
630 }
631 return false;
632 }

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

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

References $DIC, $ilSetting, ilObject\DESC_LENGTH, ilObject\getLongDescriptions(), and ilStr\shortenTextExtended().

Referenced by ilContainerContentGUI\renderItemGroup().

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

◆ getContainerDirectory()

ilContainer::getContainerDirectory ( )

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

152 : string
153 {
154 return self::_getContainerDirectory($this->getId());
155 }
static _getContainerDirectory(int $a_id)

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

+ Here is the call graph for this function:

◆ getGroupedObjTypes()

ilContainer::getGroupedObjTypes ( )

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

804 : array
805 {
806 $objDefinition = $this->obj_definition;
807
808 if (empty($this->type_grps)) {
809 $this->type_grps = $objDefinition::getGroupedRepositoryObjectTypes($this->getType());
810 }
811 return $this->type_grps;
812 }
ilObjectDefinition $obj_definition

◆ getHiddenFilesFound()

ilContainer::getHiddenFilesFound ( )

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

168 : bool
169 {
171 }

References $hiddenfilesfound.

◆ getInitialSubitems()

ilContainer::getInitialSubitems ( )
protected
Deprecated:

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

637 : array
638 {
640 if ($this->filteredSubtree()) {
641 $objects = $tree->getSubTree($tree->getNodeData($this->getRefId()));
642 } else {
643 $objects = $tree->getChilds($this->getRefId(), "title");
644 }
645 return $objects;
646 }
filteredSubtree()
Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs.
ilTree $tree
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
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node

◆ getNewsBlockActivated()

ilContainer::getNewsBlockActivated ( )

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

238 : bool
239 {
241 }
bool $news_block_activated

References $news_block_activated.

◆ getNewsTimeline()

ilContainer::getNewsTimeline ( )

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

188 : bool
189 {
191 }

References $news_timeline.

Referenced by isNewsTimelineEffective(), and isNewsTimelineLandingPageEffective().

+ Here is the caller graph for this function:

◆ getNewsTimelineAutoEntries()

ilContainer::getNewsTimelineAutoEntries ( )

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

198 : bool
199 {
201 }
bool $news_timeline_auto_entries

References $news_timeline_auto_entries.

◆ getNewsTimelineLandingPage()

ilContainer::getNewsTimelineLandingPage ( )

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

208 : bool
209 {
211 }
bool $news_timeline_landing_page

References $news_timeline_landing_page.

Referenced by isNewsTimelineLandingPageEffective().

+ Here is the caller graph for this function:

◆ getObjectTranslation()

ilContainer::getObjectTranslation ( )

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

128 : ?Translations
129 {
130 return $this->obj_trans;
131 }
Class handles translation mode for an object.
Translations $obj_trans

References $obj_trans.

◆ getOrderType()

ilContainer::getOrderType ( )

Reimplemented in ilObjCourse.

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

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

◆ getStyleSheetId()

ilContainer::getStyleSheetId ( )

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

173 : int
174 {
175 return $this->style_id;
176 }

References $style_id.

◆ getSubItems()

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

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

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

References ILIAS\Repository\int().

Referenced by ilEmployeeTalkAppointmentGUI\getPendingTalksInSeries().

+ 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 116 of file class.ilContainer.php.

116 : array
117 {
119 return [
120 self::TILE_SMALL => $lng->txt("cont_tile_size_1"),
121 self::TILE_NORMAL => $lng->txt("cont_tile_size_0"),
122 self::TILE_LARGE => $lng->txt("cont_tile_size_2"),
123 self::TILE_EXTRA_LARGE => $lng->txt("cont_tile_size_3"),
124 self::TILE_FULL => $lng->txt("cont_tile_size_4")
125 ];
126 }
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...

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

+ Here is the call graph for this function:

◆ getUseNews()

ilContainer::getUseNews ( )

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

248 : bool
249 {
250 return $this->use_news;
251 }

References $use_news.

Referenced by isNewsTimelineEffective(), and isNewsTimelineLandingPageEffective().

+ Here is the caller graph for this function:

◆ getViewMode()

ilContainer::getViewMode ( )

Reimplemented in ilObjCourse, ilObjFolder, and ilObjGroup.

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

593 : int
594 {
595 return self::VIEW_BY_TYPE;
596 }

◆ gotItems()

ilContainer::gotItems ( )
Deprecated:

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

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

◆ isClassificationFilterActive()

ilContainer::isClassificationFilterActive ( )

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

608 : bool
609 {
610 // apply container classification filters
611 $classification = $this->domain->classification($this->getRefId());
612 foreach (ilClassificationProvider::getValidProviders($this->getRefId(), $this->getId(), $this->getType()) as $class_provider) {
613 $id = get_class($class_provider);
614 $current = $classification->getSelectionOfProvider($id);
615 if ($current) {
616 return true;
617 }
618 }
619 return false;
620 }

References $classification, $id, ILIAS\Survey\Mode\getId(), and ilClassificationProvider\getValidProviders().

+ Here is the call graph for this function:

◆ isNewsTimelineEffective()

ilContainer::isNewsTimelineEffective ( )

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

213 : bool
214 {
215 if (!$this->news->isGloballyActivated()) {
216 return false;
217 }
218 if ($this->getUseNews() && $this->getNewsTimeline()) {
219 return true;
220 }
221 return false;
222 }

References getNewsTimeline(), and getUseNews().

+ Here is the call graph for this function:

◆ isNewsTimelineLandingPageEffective()

ilContainer::isNewsTimelineLandingPageEffective ( )

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

224 : bool
225 {
226 if ($this->getUseNews() && $this->getNewsTimeline() && $this->getNewsTimelineLandingPage()) {
227 return true;
228 }
229 return false;
230 }

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

+ Here is the call graph for this function:

◆ putInTree()

ilContainer::putInTree ( int  $parent_ref_id)

maybe this method should be in tree object!?

Todo:
role/rbac stuff

Reimplemented from ilObject.

Reimplemented in ilObjFolder, and ilObjStudyProgramme.

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

860 : void
861 {
862 parent::putInTree($parent_ref_id);
863
864 // copy title, icon actions visibilities
865 if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_header_icon_and_title")) {
866 self::_writeContainerSetting($this->getId(), "hide_header_icon_and_title", '1');
867 }
868 if (self::_lookupContainerSetting(ilObject::_lookupObjId($parent_ref_id), "hide_top_actions")) {
869 self::_writeContainerSetting($this->getId(), "hide_top_actions", '1');
870 }
871 }
static _lookupObjId(int $ref_id)

References ilObject\_lookupObjId(), and ILIAS\Survey\Mode\getId().

Referenced by ilECSCourseCreationHandler\createCourseReference().

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

◆ read()

ilContainer::read ( )

Reimplemented from ilObject.

Reimplemented in ilObjCourse, ilObjFolder, ilObjGroup, and ilObjLearningSequence.

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

904 : void
905 {
906 parent::read();
907
909
910 //$this->setStyleSheetId(ilObjStyleSheet::lookupObjectStyle($this->getId()));
911
912 $this->readContainerSettings();
913 $this->obj_trans = $this->getObjectProperties()->getPropertyTranslations();
914 }
setOrderType(int $a_value)

References ilContainerSortingSettings\_lookupSortMode(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ readContainerSettings()

ilContainer::readContainerSettings ( )

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

916 : void
917 {
918 $this->setNewsTimeline((bool) self::_lookupContainerSetting($this->getId(), "news_timeline"));
919 $this->setNewsTimelineAutoEntries((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_incl_auto"));
920 $this->setNewsTimelineLandingPage((bool) self::_lookupContainerSetting($this->getId(), "news_timeline_landing_page"));
921 $this->setNewsBlockActivated((bool) self::_lookupContainerSetting(
922 $this->getId(),
924 $this->setting->get('block_activated_news', '1')
925 ));
926 $this->setUseNews((bool) self::_lookupContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, '1') &&
927 $this->news->isGloballyActivated());
928 }
setUseNews(bool $a_val)
setNewsTimelineAutoEntries(bool $a_val)
setNewsBlockActivated(bool $a_val)
setNewsTimelineLandingPage(bool $a_val)
setNewsTimeline(bool $a_val)

References ILIAS\Survey\Mode\getId(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, and ilObjectServiceSettingsGUI\USE_NEWS.

+ Here is the call graph for this function:

◆ removeTranslations()

ilContainer::removeTranslations ( )

Reimplemented in ilObjOrgUnit, and ilObjRootFolder.

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

1037 : void
1038 {
1039 $this->getObjectProperties()->deletePropertyTranslations();
1040 }

◆ setHiddenFilesFound()

ilContainer::setHiddenFilesFound ( bool  $a_hiddenfilesfound)

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

163 : void
164 {
165 $this->hiddenfilesfound = $a_hiddenfilesfound;
166 }

◆ setNewsBlockActivated()

ilContainer::setNewsBlockActivated ( bool  $a_val)

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

233 : void
234 {
235 $this->news_block_activated = $a_val;
236 }

◆ setNewsTimeline()

ilContainer::setNewsTimeline ( bool  $a_val)

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

183 : void
184 {
185 $this->news_timeline = $a_val;
186 }

◆ setNewsTimelineAutoEntries()

ilContainer::setNewsTimelineAutoEntries ( bool  $a_val)

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

193 : void
194 {
195 $this->news_timeline_auto_entries = $a_val;
196 }

◆ setNewsTimelineLandingPage()

ilContainer::setNewsTimelineLandingPage ( bool  $a_val)

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

203 : void
204 {
205 $this->news_timeline_landing_page = $a_val;
206 }

◆ setObjectTranslation()

ilContainer::setObjectTranslation ( ?Translations  $obj_trans)

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

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

References $obj_trans.

◆ setOrderType()

ilContainer::setOrderType ( int  $a_value)

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

603 : void
604 {
605 $this->order_type = $a_value;
606 }

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

+ Here is the caller graph for this function:

◆ setStyleSheetId()

ilContainer::setStyleSheetId ( int  $a_style_id)

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

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

◆ setUseNews()

ilContainer::setUseNews ( bool  $a_val)

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

243 : void
244 {
245 $this->use_news = $a_val;
246 }

◆ update()

ilContainer::update ( )

Reimplemented from ilObject.

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

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

873 : bool
874 {
875 $ret = parent::update();
876
878 $log->debug("**5**" . count($this->getObjectProperties()->getPropertyTranslations()->getLanguages()));
879
880 $this->getObjectProperties()->storePropertyTranslations(
881 $this->getObjectProperties()->getPropertyTranslations()
882 ->withDefaultTitle($this->getTitle())
883 ->withDefaultDescription($this->getLongDescription())
884 );
885
887 $log->debug(":::::::::::::::::::::::::::");
888 $log->logStack(10);
889
890 //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
891
893 $log->debug("Update Container, id: " . $this->getId());
894
895 self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
896 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) (int) $this->getNewsTimelineAutoEntries());
897 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) ($this->getNewsTimelineLandingPage())));
900
901 return $ret;
902 }
logStack(?int $level=null, string $message='', array $context=[])

References $log, ILIAS\Survey\Mode\getId(), ilLoggerFactory\getLogger(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, and ilObjectServiceSettingsGUI\USE_NEWS.

Referenced by ilObjEmployeeTalkSeriesGUI\copyTemplateValues().

+ 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 70 of file class.ilContainer.php.

◆ $content_style_domain

ILIAS Style Content DomainService ilContainer::$content_style_domain
protected

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

◆ $data_preloaded

bool ilContainer::$data_preloaded = false
static

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

◆ $domain

ILIAS Container InternalDomainService ilContainer::$domain
protected

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

◆ $hiddenfilesfound

bool ilContainer::$hiddenfilesfound = false
protected

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

Referenced by getHiddenFilesFound().

◆ $items

array ilContainer::$items = []

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

◆ $news

News ilContainer::$news
protected

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

◆ $news_block_activated

bool ilContainer::$news_block_activated = false
protected

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

Referenced by getNewsBlockActivated().

◆ $news_timeline

bool ilContainer::$news_timeline = false
protected

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

Referenced by getNewsTimeline().

◆ $news_timeline_auto_entries

bool ilContainer::$news_timeline_auto_entries = false
protected

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

Referenced by getNewsTimelineAutoEntries().

◆ $news_timeline_landing_page

bool ilContainer::$news_timeline_landing_page = false
protected

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

Referenced by getNewsTimelineLandingPage().

◆ $obj_definition

ilObjectDefinition ilContainer::$obj_definition
protected

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

◆ $obj_trans

Translations ilContainer::$obj_trans = null
protected

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

Referenced by getObjectTranslation(), and setObjectTranslation().

◆ $order_type

int ilContainer::$order_type = 0
protected

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

◆ $rbacsystem

ilRbacSystem ilContainer::$rbacsystem
protected

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

◆ $recommended_content_manager

ilRecommendedContentManager ilContainer::$recommended_content_manager
protected

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

◆ $setting

ilSetting ilContainer::$setting
protected

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

◆ $style_id

int ilContainer::$style_id = 0
protected

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

Referenced by getStyleSheetId().

◆ $type_grps

array ilContainer::$type_grps = null
protected

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

◆ $use_news

bool ilContainer::$use_news = false
protected

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

Referenced by getUseNews().

◆ $user

ilObjUser ilContainer::$user
protected

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

◆ SORT_ACTIVATION

◆ SORT_CREATION

◆ SORT_DIRECTION_ASC

◆ SORT_DIRECTION_DESC

const ilContainer::SORT_DIRECTION_DESC = 1

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

◆ SORT_INHERIT

◆ SORT_MANUAL

◆ SORT_NEW_ITEMS_ORDER_ACTIVATION

const ilContainer::SORT_NEW_ITEMS_ORDER_ACTIVATION = 2

◆ SORT_NEW_ITEMS_ORDER_CREATION

◆ SORT_NEW_ITEMS_ORDER_TITLE

const ilContainer::SORT_NEW_ITEMS_ORDER_TITLE = 0

◆ SORT_NEW_ITEMS_POSITION_BOTTOM

const ilContainer::SORT_NEW_ITEMS_POSITION_BOTTOM = 1

◆ SORT_NEW_ITEMS_POSITION_TOP

const ilContainer::SORT_NEW_ITEMS_POSITION_TOP = 0

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

Referenced by ilContainerSorting\sortOrderDefault().

◆ SORT_TITLE

◆ TILE_EXTRA_LARGE

const ilContainer::TILE_EXTRA_LARGE = 3

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_FULL

const ilContainer::TILE_FULL = 4

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_LARGE

const ilContainer::TILE_LARGE = 2

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ TILE_NORMAL

const ilContainer::TILE_NORMAL = 0

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

◆ TILE_SMALL

const ilContainer::TILE_SMALL = 1

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

Referenced by ilContainerRenderer\renderHelperGeneric().

◆ VIEW_ARCHIVE

const ilContainer::VIEW_ARCHIVE = 3

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

const ilContainer::VIEW_TIMING = 2

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