ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilContainer Class Reference

Class ilContainer. More...

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

Public Member Functions

 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 createContainerDirectory ()
 Create directory for the container. More...
 
 getContainerDirectory ()
 Get the container directory. More...
 
 getBigIconPath ()
 Get path for big icon. More...
 
 getSmallIconPath ()
 Get path for small icon. More...
 
 getTinyIconPath ()
 Get path for tiny icon. More...
 
 getCustomIconPath ()
 Get path for custom icon. More...
 
 setHiddenFilesFound ($a_hiddenfilesfound)
 Set Found hidden files (set by getSubItems). More...
 
 getHiddenFilesFound ()
 Get Found hidden files (set by getSubItems). More...
 
 getStyleSheetId ()
 get ID of assigned style sheet object More...
 
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object More...
 
 setNewsTimeline ($a_val)
 Set news timeline. More...
 
 getNewsTimeline ()
 Get news timeline. More...
 
 setNewsTimelineAutoEntries ($a_val)
 Set news timeline auto entries. More...
 
 getNewsTimelineAutoEntries ()
 Get news timeline auto entries. More...
 
 setNewsTimelineLandingPage ($a_val)
 Set news timline is landing page. More...
 
 getNewsTimelineLandingPage ()
 Get news timline is landing page. More...
 
 isNewsTimelineEffective ()
 Is news timeline effective? More...
 
 isNewsTimelineLandingPageEffective ()
 Is news timeline landing page effective? More...
 
 setNewsBlockActivated ($a_val)
 Set news block activated. More...
 
 getNewsBlockActivated ()
 Get news block activated. More...
 
 setUseNews ($a_val)
 Set use news. More...
 
 getUseNews ()
 Get use news. More...
 
 saveIcons ($a_custom_icon)
 save container icons More...
 
 removeCustomIcon ()
 remove small icon More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false, $a_submode=1)
 clone all objects according to this container More...
 
 getViewMode ()
 Get container view mode. More...
 
 getOrderType ()
 Get order type default implementation. More...
 
 setOrderType ($a_value)
 
 getSubItems ($a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0)
 Get subitems of container. More...
 
 gotItems ()
 Check whether we got any items. More...
 
 addAdditionalSubItemInformation (&$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 enablePageEditing ()
 Check whether page editing is allowed for container. More...
 
 create ()
 Create. More...
 
 update ()
 Update. More...
 
 read ()
 read More...
 
 readContainerSettings ()
 Read container settings. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

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

Data Fields

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

Static Public Attributes

static $data_preloaded = false
 

Protected Attributes

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

Detailed Description

Class ilContainer.

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

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

Reimplemented from ilObject.

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

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

123 {
124 global $DIC;
125
126 $this->db = $DIC->database();
127 $this->log = $DIC["ilLog"];
128 $this->access = $DIC->access();
129 $this->error = $DIC["ilErr"];
130 $this->rbacsystem = $DIC->rbac()->system();
131 $this->tree = $DIC->repositoryTree();
132 $this->user = $DIC->user();
133 $this->obj_definition = $DIC["objDefinition"];
134
135
136 $this->setting = $DIC["ilSetting"];
137 parent::__construct($a_id, $a_reference);
138 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
global $DIC
Definition: saml.php:7

References $DIC, error(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _deleteContainerSettings()

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

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

466 {
467 global $DIC;
468
469 $ilDB = $DIC->database();
470
471 if (!$a_id) {
472 return;
473 }
474
475 $sql = "DELETE FROM container_settings WHERE " .
476 " id = " . $ilDB->quote($a_id, 'integer');
477 if ($a_keyword) {
478 if (!$a_keyword_like) {
479 $sql .= " AND keyword = " . $ilDB->quote($a_keyword, "text");
480 } else {
481 $sql .= " AND " . $ilDB->like("keyword", "text", $a_keyword);
482 }
483 }
484 $ilDB->manipulate($sql);
485 }
global $ilDB

References $DIC, and $ilDB.

Referenced by ilObjCategoryGUI\getObjectMetadataGUI().

+ Here is the caller graph for this function:

◆ _exportContainerSettings()

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

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

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

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

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

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

◆ _getContainerDirectory()

static ilContainer::_getContainerDirectory (   $a_id)
static

Get the container directory.

Returns
string container directory

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

173 {
174 return ilUtil::getWebspaceDir() . "/container_data/obj_" . $a_id;
175 }
static getWebspaceDir($mode="filesystem")
get webspace directory

References ilUtil\getWebspaceDir().

Referenced by ilObject\_getIcon(), _lookupIconPath(), and getContainerDirectory().

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

◆ _getContainerSettings()

static ilContainer::_getContainerSettings (   $a_id)
static

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

448 {
449 global $DIC;
450
451 $ilDB = $DIC->database();
452
453 $res = array();
454
455 $sql = "SELECT * FROM container_settings WHERE " .
456 " id = " . $ilDB->quote($a_id, 'integer');
457 $set = $ilDB->query($sql);
458 while ($row = $ilDB->fetchAssoc($set)) {
459 $res[$row["keyword"]] = $row["value"];
460 }
461
462 return $res;
463 }
foreach($_POST as $key=> $value) $res

References $DIC, $ilDB, $res, and $row.

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

+ Here is the caller graph for this function:

◆ _lookupContainerSetting()

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

Lookup a container setting.

Parameters
intcontainer id
stringsetting keyword
Returns
string setting value

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

399 {
400 global $DIC;
401
402 $ilDB = $DIC->database();
403
404 $q = "SELECT * FROM container_settings WHERE " .
405 " id = " . $ilDB->quote($a_id, 'integer') . " AND " .
406 " keyword = " . $ilDB->quote($a_keyword, 'text');
407 $set = $ilDB->query($q);
408 $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
409
410 if (isset($rec['value'])) {
411 return $rec["value"];
412 }
413 if ($a_default_value === null) {
414 return '';
415 }
416 return $a_default_value;
417 }

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

Referenced by ilObjCategoryGUI\__construct(), ilContSkillMemberTableGUI\__construct(), ilObject\_getIcon(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), _lookupIconPath(), ilContainerGUI\editPageContentObject(), ilContainerGUI\editPageFrameObject(), ilContSkillMemberTableGUI\fillRow(), ilContainerGUI\forwardToPageObject(), ilTaxonomyClassificationProvider\getActiveTaxonomiesForParentRefId(), ilContainerGUI\getContainerPageHTML(), ilObjCategoryListGUI\getInfoScreenStatus(), ilObjCategoryGUI\getObjectMetadataGUI(), ilTaxMDGUI\getSelectableTaxonomies(), ilObjCategoryGUI\getTabs(), ilObjCourseGUI\getTabs(), ilObjGroupGUI\getTabs(), ilObjectMetaDataGUI\hasAdvancedMDSettings(), ilObject\hasAutoRating(), ilObjRootFolderGUI\initEditForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContSkillAdminGUI\initSettingsForm(), ilContainerGUI\initStylePropertiesForm(), ilObjectListGUI\insertCommands(), ilTaggingClassificationProvider\isActive(), ilColumnGUI\isGloballyActivated(), ilBadgeHandler\isObjectActive(), ilCalendarSettings\lookupCalendarActivated(), ilObjectDataSet\readData(), ilContSkillAdminGUI\saveCompetenceAssignment(), ilContainerGUI\savePageContentObject(), ilObjRootFolderGUI\setTitleAndDescription(), and ilContainerGUI\setTitleAndDescription().

+ Here is the caller graph for this function:

◆ _lookupIconPath()

static ilContainer::_lookupIconPath (   $a_id,
  $a_size = "big" 
)
static

lookup icon path

Parameters
int$a_idcontainer object id
string$a_size"big" | "small"

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

522 {
523 if (ilContainer::_lookupContainerSetting($a_id, "icon_custom")) {
524 $cont_dir = ilContainer::_getContainerDirectory($a_id);
525
526 $file_name = $cont_dir . "/icon_custom.svg";
527 if (is_file($file_name)) {
528 return $file_name;
529 }
530 }
531
532 return "";
533 }
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _getContainerDirectory($a_id)
Get the container directory.

References _getContainerDirectory(), and _lookupContainerSetting().

Referenced by ilContainerGUI\addStandardRow(), ilPDSelectedItemsBlockGUI\addStandardRow(), getBigIconPath(), getCustomIconPath(), getSmallIconPath(), and getTinyIconPath().

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

◆ _writeContainerSetting()

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

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

425 {
426 global $DIC;
427
428 $ilDB = $DIC->database();
429
430 $query = "DELETE FROM container_settings WHERE " .
431 "id = " . $ilDB->quote($a_id, 'integer') . " " .
432 "AND keyword = " . $ilDB->quote($a_keyword, 'text');
433 $res = $ilDB->manipulate($query);
434
436 $log->debug("Write container setting, id: " . $a_id . ", keyword: " . $a_keyword . ", value: " . $a_value);
437
438 $query = "INSERT INTO container_settings (id, keyword, value) VALUES (" .
439 $ilDB->quote($a_id, 'integer') . ", " .
440 $ilDB->quote($a_keyword, 'text') . ", " .
441 $ilDB->quote($a_value, 'text') .
442 ")";
443
444 $res = $ilDB->manipulate($query);
445 }
static getLogger($a_component_id)
Get component logger.
$query

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

Referenced by create(), ilObjCategoryGUI\getObjectMetadataGUI(), ilCategoryXmlParser\handlerEndTag(), ilCourseXMLParser\handlerEndTag(), ilGroupXMLParser\handlerEndTag(), ilObjectDataSet\importRecord(), ilAdvancedMetaDataImporter\importXmlRepresentation(), removeCustomIcon(), ilObjStudyProgramme\saveIcons(), saveIcons(), ilContainerGUI\savePageContentObject(), ilContSkillAdminGUI\saveSettings(), update(), ilObjRootFolderGUI\updateObject(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), ilObjectServiceSettingsGUI\updateToolSettings(), and ilContainerGUI\useNewEditorObject().

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

◆ addAdditionalSubItemInformation()

ilContainer::addAdditionalSubItemInformation ( $object)

Add additional information to sub item, e.g.

used in courses for timings information etc.

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

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

924 {
925 }

Referenced by getSubItems().

+ Here is the caller graph for this function:

◆ cloneAllObject()

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

clone all objects according to this container

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

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

700 {
702
703 include_once('./Services/Link/classes/class.ilLink.php');
704 include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
705
706 $ilAccess = $this->access;
711
712 // Save wizard options
714 $wizard_options = ilCopyWizardOptions::_getInstance($copy_id);
715 $wizard_options->saveOwner($ilUser->getId());
716 $wizard_options->saveRoot($clone_source);
717
718 // add entry for source container
719 $wizard_options->initContainer($clone_source, $ref_id);
720
721 foreach ($options as $source_id => $option) {
722 $wizard_options->addEntry($source_id, $option);
723 }
724 $wizard_options->read();
725 $wizard_options->storeTree($clone_source);
726
727 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
728 if ($a_submode == ilObjectCopyGUI::SUBMODE_CONTENT_ONLY) {
729 ilLoggerFactory::getLogger('obj')->info('Copy content only...');
730 ilLoggerFactory::getLogger('obj')->debug('Added mapping, source ID: ' . $clone_source . ', target ID: ' . $ref_id);
731 $wizard_options->read();
732 $wizard_options->dropFirstNode();
733 $wizard_options->appendMapping($clone_source, $ref_id);
734 }
735
736
737 #print_r($options);
738 // Duplicate session to avoid logout problems with backgrounded SOAP calls
739 $new_session_id = ilSession::_duplicate($session_id);
740 // Start cloning process using soap call
741 include_once 'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
742
743 $soap_client = new ilSoapClient();
744 $soap_client->setResponseTimeout(5);
745 $soap_client->enableWSDL(true);
746
747 $ilLog->write(__METHOD__ . ': Trying to call Soap client...');
748 if ($soap_client->init()) {
749 ilLoggerFactory::getLogger('obj')->info('Calling soap clone method');
750 $res = $soap_client->call('ilClone', array($new_session_id . '::' . $client_id, $copy_id));
751 } else {
752 ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually');
753 $wizard_options->disableSOAP();
754 $wizard_options->read();
755 include_once('./webservice/soap/include/inc.soap_functions.php');
756 $res = ilSoapFunctions::ilClone($new_session_id . '::' . $client_id, $copy_id);
757 }
758 return array(
759 'copy_id' => $copy_id,
760 'ref_id' => (int) $res
761 );
762 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
static _allocateCopyId()
Allocate a copy for further entries.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
static _duplicate($a_session_id)
Duplicate session.
static ilClone($sid, $copy_identifier)
$client_id
global $ilErr
Definition: raiseError.php:16
$ilUser
Definition: imgupload.php:18

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

+ Here is the call graph for this function:

◆ cloneDependencies()

ilContainer::cloneDependencies (   $a_target_id,
  $a_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 ilObjCategory, ilObjCourse, ilObjFolder, and ilObjGroup.

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

660 {
662
663 parent::cloneDependencies($a_target_id, $a_copy_id);
664
665 include_once('./Services/Container/classes/class.ilContainerSorting.php');
666 ilContainerSorting::_getInstance($this->getId())->cloneSorting($a_target_id, $a_copy_id);
667
668 // fix internal links to other objects
669 ilContainer::fixInternalLinksAfterCopy($a_target_id, $a_copy_id, $this->getRefId());
670
671 // fix item group references in page content
672 include_once("./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
674
675 include_once('Services/Object/classes/class.ilObjectLP.php');
676 $olp = ilObjectLP::getInstance($this->getId());
677 $collection = $olp->getCollectionInstance();
678 if ($collection) {
679 $collection->cloneCollection($a_target_id, $a_copy_id);
680 }
681
682 return true;
683 }
static _getInstance($a_obj_id)
get instance by obj_id
static fixContainerItemGroupRefsAfterCloning($a_source_container, $a_copy_id)
Fix container item group references after a container has been cloned.
static getInstance($a_obj_id)
getRefId()
get reference id @access public
getId()
get object id @access public

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

+ Here is the call graph for this function:

◆ create()

ilContainer::create ( )

Create.

Reimplemented from ilObject.

Reimplemented in ilObjGroup, ilObjOrgUnit, and ilObjStudyProgramme.

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

959 {
960 $ret = parent::create();
961
962 if (((int) $this->getStyleSheetId()) > 0) {
963 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
965 }
966
968 $log->debug("Create Container, id: " . $this->getId());
969
970 self::_writeContainerSetting($this->getId(), "news_timeline", (int) $this->getNewsTimeline());
971 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (int) $this->getNewsTimelineAutoEntries());
972 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (int) $this->getNewsTimelineLandingPage());
973 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
976
977 return $ret;
978 }
getNewsTimeline()
Get news timeline.
getStyleSheetId()
get ID of assigned style sheet object
getNewsTimelineLandingPage()
Get news timline is landing page.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
getNewsBlockActivated()
Get news block activated.
getNewsTimelineAutoEntries()
Get news timeline auto entries.
getUseNews()
Get use news.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
$ret
Definition: parser.php:6

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

+ Here is the call graph for this function:

◆ createContainerDirectory()

ilContainer::createContainerDirectory ( )

Create directory for the container.

It is <webspace_dir>/container_data.

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

145 {
146 $webspace_dir = ilUtil::getWebspaceDir();
147 $cont_dir = $webspace_dir . "/container_data";
148 if (!is_dir($cont_dir)) {
149 ilUtil::makeDir($cont_dir);
150 }
151 $obj_dir = $cont_dir . "/obj_" . $this->getId();
152 if (!is_dir($obj_dir)) {
153 ilUtil::makeDir($obj_dir);
154 }
155 }
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...

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

Referenced by ilObjStudyProgramme\saveIcons(), and saveIcons().

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

◆ enablePageEditing()

ilContainer::enablePageEditing ( )

Check whether page editing is allowed for container.

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

946 {
948
949 // @todo: this will need a more general approach
950 if ($ilSetting->get("enable_cat_page_edit")) {
951 return true;
952 }
953 }
global $ilSetting
Definition: privfeed.php:17

References $ilSetting, and $setting.

◆ getBigIconPath()

ilContainer::getBigIconPath ( )

Get path for big icon.

Returns
string icon path
Deprecated:
use _lookupIconPath instead

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

184 {
185 return self::_lookupIconPath($this->getId());
186 }
static _lookupIconPath($a_id, $a_size="big")
lookup icon path

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

+ Here is the call graph for this function:

◆ getCompleteDescriptions()

static ilContainer::getCompleteDescriptions ( array  $objects)
static

overwrites description fields to long or short description in an assoc array keys needed (obj_id and description)

Parameters
array$objects
Returns
array

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

1053 {
1054 global $DIC;
1055
1056 $ilSetting = $DIC->settings();
1057 $ilObjDataCache = $DIC["ilObjDataCache"];
1058 // using long descriptions?
1059 $short_desc = $ilSetting->get("rep_shorten_description");
1060 $short_desc_max_length = $ilSetting->get("rep_shorten_description_length");
1061 if (!$short_desc || $short_desc_max_length != ilObject::DESC_LENGTH) {
1062 // using (part of) shortened description
1063 if ($short_desc && $short_desc_max_length && $short_desc_max_length < ilObject::DESC_LENGTH) {
1064 foreach ($objects as $key => $object) {
1065 $objects[$key]["description"] = ilUtil::shortenText($object["description"], $short_desc_max_length, true);
1066 }
1067 }
1068 // using (part of) long description
1069 else {
1070 $obj_ids = array();
1071 foreach ($objects as $key => $object) {
1072 $obj_ids[] = $object["obj_id"];
1073 }
1074 if (sizeof($obj_ids)) {
1076 foreach ($objects as $key => $object) {
1077 // #12166 - keep translation, ignore long description
1078 if ($ilObjDataCache->isTranslatedDescription($object["obj_id"])) {
1079 $long_desc[$object["obj_id"]] = $object["description"];
1080 }
1081 if ($short_desc && $short_desc_max_length) {
1082 $long_desc[$object["obj_id"]] = ilUtil::shortenText($long_desc[$object["obj_id"]], $short_desc_max_length, true);
1083 }
1084 $objects[$key]["description"] = $long_desc[$object["obj_id"]];
1085 }
1086 }
1087 }
1088 }
1089 return $objects;
1090 }
const DESC_LENGTH
static getLongDescriptions(array $a_obj_ids)
Get long description data.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
$key
Definition: croninfo.php:18

References $DIC, $ilSetting, $key, ilObject\$long_desc, ilObject\DESC_LENGTH, ilObject\getLongDescriptions(), and ilUtil\shortenText().

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

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

◆ getContainerDirectory()

ilContainer::getContainerDirectory ( )

Get the container directory.

Returns
string container directory

Reimplemented in ilObjStudyProgramme.

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

163 {
164 return $this->_getContainerDirectory($this->getId());
165 }

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

Referenced by removeCustomIcon(), and saveIcons().

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

◆ getCustomIconPath()

ilContainer::getCustomIconPath ( )

Get path for custom icon.

Returns
string icon path

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

216 {
217 return self::_lookupIconPath($this->getId());
218 }

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

+ Here is the call graph for this function:

◆ getGroupedObjTypes()

ilContainer::getGroupedObjTypes ( )

Get grouped repository object types.

Returns
array array of object types

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

933 {
935
936 if (empty($this->type_grps)) {
937 $this->type_grps = $objDefinition->getGroupedRepositoryObjectTypes($this->getType());
938 }
939 return $this->type_grps;
940 }
getType()
get object type @access public

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

Referenced by getSubItems().

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

◆ getHiddenFilesFound()

ilContainer::getHiddenFilesFound ( )

Get Found hidden files (set by getSubItems).

Returns
boolean Found hidden files (set by getSubItems)

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

237 {
239 }

References $hiddenfilesfound.

◆ getNewsBlockActivated()

ilContainer::getNewsBlockActivated ( )

Get news block activated.

Returns
bool news block activated

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

366 {
367 return $this->news_block_activated;
368 }

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getNewsTimeline()

ilContainer::getNewsTimeline ( )

Get news timeline.

Returns
bool activate news timeline

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

273 {
275 }

References $news_timeline.

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

+ Here is the caller graph for this function:

◆ getNewsTimelineAutoEntries()

ilContainer::getNewsTimelineAutoEntries ( )

Get news timeline auto entries.

Returns
bool include automatically created entries

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

293 {
295 }

References $news_timeline_auto_entries.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getNewsTimelineLandingPage()

ilContainer::getNewsTimelineLandingPage ( )

Get news timline is landing page.

Returns
bool is news timline landing page?

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

313 {
314 return $this->news_timeline_landing_page;
315 }

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

+ Here is the caller graph for this function:

◆ getOrderType()

ilContainer::getOrderType ( )

Get order type default implementation.

Reimplemented in ilObjCourse.

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

776 {
777 return $this->order_type ? $this->order_type : ilContainer::SORT_TITLE;
778 }

References SORT_TITLE.

◆ getSmallIconPath()

ilContainer::getSmallIconPath ( )

Get path for small icon.

Returns
string icon path
Deprecated:
use _lookupIconPath instead

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

195 {
196 return self::_lookupIconPath($this->getId());
197 }

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

+ Here is the call graph for this function:

◆ getStyleSheetId()

ilContainer::getStyleSheetId ( )

get ID of assigned style sheet object

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

245 {
246 return $this->style_id;
247 }

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getSubItems()

ilContainer::getSubItems (   $a_admin_panel_enabled = false,
  $a_include_side_block = false,
  $a_get_single = 0 
)

Get subitems of container.

Parameters
booladministration panel enabled
boolside blocks enabled
Returns
array

Reimplemented in ilObjCourse.

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

794 {
797
798 // Caching
799 if (is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]) &&
800 !$a_get_single) {
801 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
802 }
803
804 $type_grps = $this->getGroupedObjTypes();
805 $objects = $tree->getChilds($this->getRefId(), "title");
806
807 $objects = self::getCompleteDescriptions($objects);
808
809 $found = false;
810 $all_ref_ids = array();
811
812 if (!self::$data_preloaded) {
813 include_once("./Services/Object/classes/class.ilObjectListGUIPreloader.php");
815 }
816
817 include_once('Services/Container/classes/class.ilContainerSorting.php');
818 $sort = ilContainerSorting::_getInstance($this->getId());
819
820 // TODO: check this
821 // get items attached to a session
822 include_once './Modules/Session/classes/class.ilEventItems.php';
823 $event_items = ilEventItems::_getItemsOfContainer($this->getRefId());
824
825 foreach ($objects as $key => $object) {
826 if ($a_get_single > 0 && $object["child"] != $a_get_single) {
827 continue;
828 }
829
830 // hide object types in devmode
831 if ($objDefinition->getDevMode($object["type"]) || $object["type"] == "adm"
832 || $object["type"] == "rolf") {
833 continue;
834 }
835
836 // remove inactive plugins
837 if ($objDefinition->isInactivePlugin($object["type"])) {
838 continue;
839 }
840
841 // BEGIN WebDAV: Don't display hidden Files, Folders and Categories
842 if (in_array($object['type'], array('file','fold','cat'))) {
843 include_once 'Modules/File/classes/class.ilObjFileAccess.php';
844 if (ilObjFileAccess::_isFileHidden($object['title'])) {
845 $this->setHiddenFilesFound(true);
846 if (!$a_admin_panel_enabled) {
847 continue;
848 }
849 }
850 }
851 // END WebDAV: Don't display hidden Files, Folders and Categories
852
853 // including event items!
854 if (!self::$data_preloaded) {
855 $preloader->addItem($object["obj_id"], $object["type"], $object["child"]);
856 }
857
858 // filter out items that are attached to an event
859 if (in_array($object['ref_id'], $event_items)) {
860 continue;
861 }
862
863 // filter side block items
864 if (!$a_include_side_block && $objDefinition->isSideBlock($object['type'])) {
865 continue;
866 }
867
868 $all_ref_ids[] = $object["child"];
869 }
870
871 // data preloader
872 if (!self::$data_preloaded) {
873 $preloader->preload();
874 unset($preloader);
875
876 self::$data_preloaded = true;
877 }
878
879 foreach ($objects as $key => $object) {
880 // see above, objects were filtered
881 if (!in_array($object["child"], $all_ref_ids)) {
882 continue;
883 }
884
885 // group object type groups together (e.g. learning resources)
886 $type = $objDefinition->getGroupOfObj($object["type"]);
887 if ($type == "") {
888 $type = $object["type"];
889 }
890
891 // this will add activation properties
892 $this->addAdditionalSubItemInformation($object);
893
894 $this->items[$type][$key] = $object;
895
896 $this->items["_all"][$key] = $object;
897 if ($object["type"] != "sess") {
898 $this->items["_non_sess"][$key] = $object;
899 }
900 }
901
902 $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]
903 = $sort->sortItems($this->items);
904
905 return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
906 }
getGroupedObjTypes()
Get grouped repository object types.
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
setHiddenFilesFound($a_hiddenfilesfound)
Set Found hidden files (set by getSubItems).
addAdditionalSubItemInformation(&$object)
Add additional information to sub item, e.g.
static _getItemsOfContainer($a_ref_id)
static _isFileHidden($a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user.
Preloader for object list GUIs.

References $key, $obj_definition, ilObject\$objDefinition, $tree, ilObject\$type, ilContainerSorting\_getInstance(), ilEventItems\_getItemsOfContainer(), ilObjFileAccess\_isFileHidden(), addAdditionalSubItemInformation(), ilObjectListGUI\CONTEXT_REPOSITORY, getCompleteDescriptions(), getGroupedObjTypes(), ilObject\getId(), ilObject\getRefId(), and setHiddenFilesFound().

+ Here is the call graph for this function:

◆ getTinyIconPath()

ilContainer::getTinyIconPath ( )

Get path for tiny icon.

Returns
string icon path
Deprecated:
use _lookupIconPath instead

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

206 {
207 return self::_lookupIconPath($this->getId());
208 }

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

+ Here is the call graph for this function:

◆ getUseNews()

ilContainer::getUseNews ( )

Get use news.

Returns
bool use news system?

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

386 {
387 return $this->use_news;
388 }

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

+ Here is the caller graph for this function:

◆ getViewMode()

ilContainer::getViewMode ( )

Get container view mode.

Reimplemented in ilObjCourse, and ilObjFolder.

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

768 {
770 }

References VIEW_BY_TYPE.

Referenced by ilObjGroup\cloneObject(), ilObjGroup\create(), and ilObjGroup\update().

+ Here is the caller graph for this function:

◆ gotItems()

ilContainer::gotItems ( )

Check whether we got any items.

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

912 {
913 if (is_array($this->items["_all"]) && count($this->items["_all"]) > 0) {
914 return true;
915 }
916 return false;
917 }

◆ isNewsTimelineEffective()

ilContainer::isNewsTimelineEffective ( )

Is news timeline effective?

Returns
bool

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

323 {
324 if ($this->getUseNews()) {
325 if ($this->getNewsTimeline()) {
326 return true;
327 }
328 }
329 return false;
330 }

References getNewsTimeline(), and getUseNews().

+ Here is the call graph for this function:

◆ isNewsTimelineLandingPageEffective()

ilContainer::isNewsTimelineLandingPageEffective ( )

Is news timeline landing page effective?

Returns
bool

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

338 {
339 if ($this->getUseNews()) {
340 if ($this->getNewsTimeline()) {
341 if ($this->getNewsTimelineLandingPage()) {
342 return true;
343 }
344 }
345 }
346 return false;
347 }

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

+ Here is the call graph for this function:

◆ read()

ilContainer::read ( )

read

@access public

Parameters

return

Reimplemented from ilObject.

Reimplemented in ilObjCourse, ilObjFolder, ilObjGroup, and ilObjStudyProgramme.

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

1012 {
1013 parent::read();
1014
1015 include_once("./Services/Container/classes/class.ilContainerSortingSettings.php");
1017
1018 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1020
1021 $this->readContainerSettings();
1022 }
static _lookupSortMode($a_obj_id)
lookup sort mode
setOrderType($a_value)
setStyleSheetId($a_style_id)
set ID of assigned style sheet object
readContainerSettings()
Read container settings.
static lookupObjectStyle($a_obj_id)
Lookup object style.

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

+ Here is the call graph for this function:

◆ readContainerSettings()

ilContainer::readContainerSettings ( )

Read container settings.

Parameters

return

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

1031 {
1032 $this->setNewsTimeline(self::_lookupContainerSetting($this->getId(), "news_timeline"));
1033 $this->setNewsTimelineAutoEntries(self::_lookupContainerSetting($this->getId(), "news_timeline_incl_auto"));
1034 $this->setNewsTimelineLandingPage(self::_lookupContainerSetting($this->getId(), "news_timeline_landing_page"));
1035 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
1036 $this->setNewsBlockActivated(self::_lookupContainerSetting(
1037 $this->getId(),
1039 $this->setting->get('block_activated_news', true)
1040 ));
1041 $this->setUseNews(self::_lookupContainerSetting($this->getId(), ilObjectServiceSettingsGUI::USE_NEWS, true));
1042 }
setNewsTimeline($a_val)
Set news timeline.
setNewsTimelineLandingPage($a_val)
Set news timline is landing page.
setNewsBlockActivated($a_val)
Set news block activated.
setUseNews($a_val)
Set use news.
setNewsTimelineAutoEntries($a_val)
Set news timeline auto entries.

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

Referenced by read().

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

◆ removeCustomIcon()

ilContainer::removeCustomIcon ( )

remove small icon

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

562 {
563 $cont_dir = $this->getContainerDirectory();
564 $small_file_name = $cont_dir . "/icon_custom.svg";
565 @unlink($small_file_name);
566 ilContainer::_writeContainerSetting($this->getId(), "icon_custom", 0);
567 }
getContainerDirectory()
Get the container directory.

References _writeContainerSetting(), getContainerDirectory(), and ilObject\getId().

Referenced by ilObjStudyProgramme\updateCustomIcon().

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

◆ saveIcons()

ilContainer::saveIcons (   $a_custom_icon)

save container icons

Reimplemented in ilObjStudyProgramme.

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

539 {
541 $cont_dir = $this->getContainerDirectory();
542
543 if ($a_custom_icon != "") {
544 if (is_file($cont_dir . "/icon_custom.svg")) {
545 unlink($cont_dir . "/icon_custom.svg");
546 }
547 $file_name = $cont_dir . "/icon_custom.svg";
548 ilUtil::moveUploadedFile($a_custom_icon, "icon_custom.svg", $file_name);
549
550 if ($file_name != "" && is_file($file_name)) {
551 ilContainer::_writeContainerSetting($this->getId(), "icon_custom", 1);
552 } else {
553 ilContainer::_writeContainerSetting($this->getId(), "icon_custom", 0);
554 }
555 }
556 }
createContainerDirectory()
Create directory for the container.

References _writeContainerSetting(), createContainerDirectory(), getContainerDirectory(), and ilObject\getId().

+ Here is the call graph for this function:

◆ setHiddenFilesFound()

ilContainer::setHiddenFilesFound (   $a_hiddenfilesfound)

Set Found hidden files (set by getSubItems).

Parameters
boolean$a_hiddenfilesfoundFound hidden files (set by getSubItems)

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

227 {
228 $this->hiddenfilesfound = $a_hiddenfilesfound;
229 }

Referenced by getSubItems().

+ Here is the caller graph for this function:

◆ setNewsBlockActivated()

ilContainer::setNewsBlockActivated (   $a_val)

Set news block activated.

Parameters
bool$a_valnews block activated

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

356 {
357 $this->news_block_activated = $a_val;
358 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ setNewsTimeline()

ilContainer::setNewsTimeline (   $a_val)

Set news timeline.

Parameters
bool$a_valactivate news timeline

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

263 {
264 $this->news_timeline = $a_val;
265 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ setNewsTimelineAutoEntries()

ilContainer::setNewsTimelineAutoEntries (   $a_val)

Set news timeline auto entries.

Parameters
bool$a_valinclude automatically created entries

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

283 {
284 $this->news_timeline_auto_entries = $a_val;
285 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ setNewsTimelineLandingPage()

ilContainer::setNewsTimelineLandingPage (   $a_val)

Set news timline is landing page.

Parameters
bool$a_valis news timline landing page?

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

303 {
304 $this->news_timeline_landing_page = $a_val;
305 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ setOrderType()

ilContainer::setOrderType (   $a_value)

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

781 {
782 $this->order_type = $a_value;
783 }

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

+ Here is the caller graph for this function:

◆ setStyleSheetId()

ilContainer::setStyleSheetId (   $a_style_id)

set ID of assigned style sheet object

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

253 {
254 $this->style_id = $a_style_id;
255 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setUseNews()

ilContainer::setUseNews (   $a_val)

Set use news.

Parameters
bool$a_valuse news system?

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

376 {
377 $this->use_news = $a_val;
378 }

Referenced by readContainerSettings().

+ Here is the caller graph for this function:

◆ update()

ilContainer::update ( )

Update.

Reimplemented from ilObject.

Reimplemented in ilObjCourse, ilObjGroup, ilObjOrgUnit, and ilObjStudyProgramme.

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

984 {
986
987 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
989
991 $log->debug("Update Container, id: " . $this->getId());
992
993 self::_writeContainerSetting($this->getId(), "news_timeline", (int) $this->getNewsTimeline());
994 self::_writeContainerSetting($this->getId(), "news_timeline_incl_auto", (int) $this->getNewsTimelineAutoEntries());
995 self::_writeContainerSetting($this->getId(), "news_timeline_landing_page", (int) $this->getNewsTimelineLandingPage());
996 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
999
1000 return $ret;
1001 }
update($pash, $contents, Config $config)

References $log, $ret, _writeContainerSetting(), ilObject\getId(), ilLoggerFactory\getLogger(), getNewsBlockActivated(), getNewsTimeline(), getNewsTimelineAutoEntries(), getNewsTimelineLandingPage(), getStyleSheetId(), getUseNews(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, League\Flysystem\Adapter\Polyfill\update(), ilObjectServiceSettingsGUI\USE_NEWS, and ilObjStyleSheet\writeStyleUsage().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilContainer::$access
protected

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

Referenced by cloneAllObject(), and ilObjFolder\downloadFolder().

◆ $data_preloaded

ilContainer::$data_preloaded = false
static

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

◆ $db

◆ $error

ilContainer::$error
protected

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

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

◆ $hiddenfilesfound

ilContainer::$hiddenfilesfound = false
protected

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

Referenced by getHiddenFilesFound().

◆ $log

ilContainer::$log
protected

◆ $news_timeline

ilContainer::$news_timeline = false
protected

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

Referenced by getNewsTimeline().

◆ $news_timeline_auto_entries

ilContainer::$news_timeline_auto_entries = false
protected

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

Referenced by getNewsTimelineAutoEntries().

◆ $obj_definition

ilObjectDefinition ilContainer::$obj_definition
protected

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

Referenced by getGroupedObjTypes(), and getSubItems().

◆ $order_type

ilContainer::$order_type = 0
protected

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

◆ $rbacsystem

ilContainer::$rbacsystem
protected

◆ $setting

ilContainer::$setting
protected

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

Referenced by enablePageEditing().

◆ $tree

◆ $user

ilContainer::$user
protected

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

Referenced by cloneAllObject().

◆ SORT_ACTIVATION

◆ SORT_CREATION

◆ SORT_DIRECTION_ASC

◆ SORT_DIRECTION_DESC

const ilContainer::SORT_DIRECTION_DESC = 1

◆ SORT_INHERIT

◆ SORT_MANUAL

◆ SORT_NEW_ITEMS_ORDER_ACTIVATION

◆ SORT_NEW_ITEMS_ORDER_CREATION

◆ SORT_NEW_ITEMS_ORDER_TITLE

◆ SORT_NEW_ITEMS_POSITION_BOTTOM

◆ SORT_NEW_ITEMS_POSITION_TOP

◆ SORT_TITLE

◆ VIEW_ARCHIVE

const ilContainer::VIEW_ARCHIVE = 3

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

◆ VIEW_BY_TYPE

◆ VIEW_DEFAULT

const ilContainer::VIEW_DEFAULT = self::VIEW_BY_TYPE

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

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

◆ VIEW_INHERIT

const ilContainer::VIEW_INHERIT = 6

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

Referenced by ilObjGroupGUI\initForm(), and ilObjGroup\translateViewMode().

◆ VIEW_OBJECTIVE

◆ VIEW_SESSIONS

◆ VIEW_SIMPLE

◆ VIEW_TIMING

const ilContainer::VIEW_TIMING = 2

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