ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 }
$q
Definition: shib_logout.php:23

◆ _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(), ilObjPortfolioTemplateGUI\getEditFormCustomValues(), ILIAS\ILIASObject\Properties\AdditionalProperties\LegacyRepository\getHeaderActionVisibility(), ilObjCategoryListGUI\getInfoScreenStatus(), ilObjContentPageListGUI\getInfoScreenStatus(), ILIAS\ILIASObject\Properties\AdditionalProperties\LegacyRepository\getInfoTabVisibility(), ilCourseMembershipGUI\getMailContextOptions(), ilGroupMembershipGUI\getMailContextOptions(), 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(), 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 796 of file class.ilContainer.php.

796 : void
797 {
798 }

◆ addTranslation()

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

Reimplemented in ilObjOrgUnit, and ilObjRootFolder.

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

1043 : void {
1044 if (empty($a_title)) {
1045 $a_title = "NO TITLE";
1046 }
1047
1048 $this->obj_trans = $this->obj_trans->withLanguage(
1049 new Language(
1050 $a_lang,
1051 $a_title,
1052 $a_desc,
1053 (bool) $a_lang_default
1054 )
1055 );
1056 $this->getObjectProperties()->storePropertyTranslations($this->obj_trans);
1057 }

◆ applyContainerUserFilter()

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

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

1062 : array {
1063 $filter = $this->domain->content()->filter(
1064 $objects,
1065 $container_user_filter,
1066 !self::_lookupContainerSetting($this->getId(), "filter_show_empty", false)
1067 );
1068 return $filter->apply();
1069 }

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

822 : int
823 {
824 global $DIC;
825
826 $lng = $DIC->language();
827
828 $ret = parent::create();
829
830 // set translation object, since we have an object id now
831 $this->obj_trans = $this->getObjectProperties()->getPropertyTranslations();
832
833 // add default translation
834 $this->addTranslation(
835 $this->getTitle(),
836 $this->getLongDescription(),
838 '1'
839 );
840
841 if (($this->getStyleSheetId()) > 0) {
842 //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
843 }
844
846 $log->debug("Create Container, id: " . $this->getId());
847
848 self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
849 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) ((int) $this->getNewsTimelineAutoEntries()));
850 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) $this->getNewsTimelineLandingPage()));
853
854 return $ret;
855 }
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 return true;
588 }

◆ deleteTranslation()

ilContainer::deleteTranslation ( string  $a_lang)

Reimplemented in ilObjOrgUnit, and ilObjRootFolder.

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

1032 : void
1033 {
1034 $this->obj_trans = $this->obj_trans->withoutLanguage($a_lang);
1035 $this->getObjectProperties()->storePropertyTranslations($this->obj_trans);
1036 }

◆ enablePageEditing()

ilContainer::enablePageEditing ( )

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

811 : bool
812 {
814
815 // @todo: this will need a more general approach
816 if ($ilSetting->get("enable_cat_page_edit")) {
817 return true;
818 }
819 return false;
820 }
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 623 of file class.ilContainer.php.

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

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

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

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

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

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

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

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

590 : int
591 {
592 return self::VIEW_BY_TYPE;
593 }

◆ gotItems()

ilContainer::gotItems ( )
Deprecated:

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

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

◆ isClassificationFilterActive()

ilContainer::isClassificationFilterActive ( )

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

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

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

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

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

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

1027 : void
1028 {
1029 $this->getObjectProperties()->deletePropertyTranslations();
1030 }

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

600 : void
601 {
602 $this->order_type = $a_value;
603 }

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

870 : bool
871 {
872 $ret = parent::update();
873
875 $log->debug("**5**" . count($this->getObjectProperties()->getPropertyTranslations()->getLanguages()));
876
877 $this->getObjectProperties()->storePropertyTranslations(
878 $this->getObjectProperties()->getPropertyTranslations()
879 ->withDefaultTitle($this->getTitle())
880 ->withDefaultDescription($this->getLongDescription())
881 );
882
884 $log->debug(":::::::::::::::::::::::::::");
885 $log->logStack(10);
886
887 //ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
888
890 $log->debug("Update Container, id: " . $this->getId());
891
892 self::_writeContainerSetting($this->getId(), "news_timeline", (string) ((int) $this->getNewsTimeline()));
893 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (string) (int) $this->getNewsTimelineAutoEntries());
894 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (string) ((int) ($this->getNewsTimelineLandingPage())));
897
898 return $ret;
899 }
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: