ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjFolder Class Reference

Class ilObjFolder. More...

+ Inheritance diagram for ilObjFolder:
+ Collaboration diagram for ilObjFolder:

Public Member Functions

 __construct (int $a_id=0, bool $a_call_by_reference=true)
 
 setFolderTree (ilTree $a_tree)
 
 cloneObject (int $target_id, int $copy_id=0, bool $omit_tree=false)
 
 putInTree (int $parent_ref_id)
 
 cloneDependencies (int $target_id, int $copy_id)
 
 getViewMode ()
 
 addAdditionalSubItemInformation (array &$object)
 
 read ()
 
- Public Member Functions inherited from ilContainer
 getTileSizes ()
 
 getObjectTranslation ()
 
 setObjectTranslation (?ilObjectTranslation $obj_trans)
 
 createContainerDirectory ()
 
 getContainerDirectory ()
 
 setHiddenFilesFound (bool $a_hiddenfilesfound)
 
 getHiddenFilesFound ()
 
 getStyleSheetId ()
 
 setStyleSheetId (int $a_style_id)
 
 setNewsTimeline (bool $a_val)
 
 getNewsTimeline ()
 
 setNewsTimelineAutoEntries (bool $a_val)
 
 getNewsTimelineAutoEntries ()
 
 setNewsTimelineLandingPage (bool $a_val)
 
 getNewsTimelineLandingPage ()
 
 isNewsTimelineEffective ()
 
 isNewsTimelineLandingPageEffective ()
 
 setNewsBlockActivated (bool $a_val)
 
 getNewsBlockActivated ()
 
 setUseNews (bool $a_val)
 
 getUseNews ()
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject (string $session_id, string $client_id, string $new_type, int $ref_id, int $clone_source, array $options, bool $soap_call=false, int $a_submode=1)
 
 delete ()
 delete category and all related data More...
 
 getViewMode ()
 
 getOrderType ()
 
 setOrderType (int $a_value)
 
 isClassificationFilterActive ()
 
 filteredSubtree ()
 Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs. More...
 
 getSubItems (bool $a_admin_panel_enabled=false, bool $a_include_side_block=false, int $a_get_single=0, ?ilContainerUserFilter $container_user_filter=null)
 
 gotItems ()
 
 addAdditionalSubItemInformation (array &$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 
 enablePageEditing ()
 
 create ()
 
 putInTree (int $parent_ref_id)
 
 update ()
 
 read ()
 
 readContainerSettings ()
 
 removeTranslations ()
 
 deleteTranslation (string $a_lang)
 
 addTranslation (string $a_title, string $a_desc, string $a_lang, string $a_lang_default)
 
- Public Member Functions inherited from ilObject
 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)
 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...
 

Data Fields

ilTree $folder_tree = null
 
- Data Fields inherited from ilContainer
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
 

Additional Inherited Members

- Static Public Member Functions inherited from ilContainer
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)
 
- Static Public Attributes inherited from ilContainer
static bool $data_preloaded = false
 
- Protected Member Functions inherited from ilContainer
 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 inherited from ilContainer
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
 
ilObjectTranslation $obj_trans = null
 
int $style_id = 0
 
bool $news_timeline_landing_page = false
 
bool $news_block_activated = false
 
bool $use_news = false
 
ilRecommendedContentManager $recommended_content_manager
 
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 ilObjFolder.

Author
Wolfgang Merkens wmerk.nosp@m.ens@.nosp@m.datab.nosp@m.ay.d.nosp@m.e

Definition at line 26 of file class.ilObjFolder.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjFolder::__construct ( int  $a_id = 0,
bool  $a_call_by_reference = true 
)

Definition at line 30 of file class.ilObjFolder.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), and ILIAS\Repository\lng().

33  {
34  global $DIC;
35 
36  $this->tree = $DIC->repositoryTree();
37  $this->lng = $DIC->language();
38  $this->rbacsystem = $DIC->rbac()->system();
39  $this->access = $DIC->access();
40  $this->type = "fold";
41  parent::__construct($a_id, $a_call_by_reference);
42  $this->lng->loadLanguageModule('fold');
43  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addAdditionalSubItemInformation()

ilObjFolder::addAdditionalSubItemInformation ( array &  $object)

Definition at line 117 of file class.ilObjFolder.php.

References ilObjectActivation\addAdditionalSubItemInformation().

117  : void
118  {
120  }
static addAdditionalSubItemInformation(array &$item)
Parse item data for list entries.
+ Here is the call graph for this function:

◆ cloneDependencies()

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

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

References ilObjectActivation\cloneDependencies(), and ilObject\getRefId().

79  : bool
80  {
81  parent::cloneDependencies($target_id, $copy_id);
82 
83  ilObjectActivation::cloneDependencies($this->getRefId(), $target_id, $copy_id);
84 
85  return true;
86  }
static cloneDependencies(int $ref_id, int $target_id, int $copy_id)
+ Here is the call graph for this function:

◆ cloneObject()

ilObjFolder::cloneObject ( int  $target_id,
int  $copy_id = 0,
bool  $omit_tree = false 
)

Definition at line 50 of file class.ilObjFolder.php.

References ilObject\getId().

50  : ?ilObject
51  {
52  $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
53 
54  // Copy learning progress settings
55  $obj_settings = new ilLPObjSettings($this->getId());
56  $obj_settings->cloneSettings($new_obj->getId());
57  unset($obj_settings);
58 
59  return $new_obj;
60  }
+ Here is the call graph for this function:

◆ getViewMode()

ilObjFolder::getViewMode ( )

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

References ilObject\$tree, ilObject\_lookupObjId(), ilObjCourseAccess\_lookupViewMode(), ilTree\checkForParentType(), ilObjGroup\lookupViewMode(), ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

88  : int
89  {
91  $possible_view_modes = [
95  ];
96 
97  // always try to inherit from grp container, then crs container
98  $container_grp_ref_id = $tree->checkForParentType($this->ref_id, 'grp');
99  if ($container_grp_ref_id) {
100  $grp_view_mode = ilObjGroup::lookupViewMode(ilObject::_lookupObjId($container_grp_ref_id));
101  if (in_array($grp_view_mode, $possible_view_modes)) {
102  return $grp_view_mode;
103  }
104  }
105  $container_crs_ref_id = $tree->checkForParentType($this->ref_id, 'crs');
106  if ($container_crs_ref_id) {
107  $crs_view_mode = ilObjCourseAccess::_lookupViewMode(ilObject::_lookupObjId($container_crs_ref_id));
108  if (in_array($crs_view_mode, $possible_view_modes)) {
109  return $crs_view_mode;
110  }
111  }
112 
113  // default: by type
115  }
ilTree $tree
static _lookupObjId(int $ref_id)
checkForParentType(int $a_ref_id, string $a_type, bool $a_exclude_source_check=false)
Check for parent type e.g check if a folder (ref_id 3) is in a parent course obj => checkForParentTyp...
static _lookupViewMode(int $a_id)
static lookupViewMode($a_obj_id)
+ Here is the call graph for this function:

◆ putInTree()

ilObjFolder::putInTree ( int  $parent_ref_id)

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

References ilObject\$tree, ilObject\getId(), ilObject\getRefId(), ilTree\insertNode(), and ilObject\withReferences().

62  : void
63  {
65 
66  if (!is_object($this->folder_tree)) {
67  $this->folder_tree = &$tree;
68  }
69 
70  if ($this->withReferences()) {
71  // put reference id into tree
72  $this->folder_tree->insertNode($this->getRefId(), $parent_ref_id);
73  } else {
74  // put object id into tree
75  $this->folder_tree->insertNode($this->getId(), $parent_ref_id);
76  }
77  }
withReferences()
determines whether objects are referenced or not (got ref ids or not)
ilTree $tree
insertNode(int $a_node_id, int $a_parent_id, int $a_pos=self::POS_LAST_NODE, bool $a_reset_deletion_date=false)
insert new node with node_id under parent node with parent_id
+ Here is the call graph for this function:

◆ read()

ilObjFolder::read ( )

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

References ilContainerSortingSettings\_lookupSortMode(), ilObject\getId(), and ilContainer\setOrderType().

122  : void
123  {
124  parent::read();
125 
126  // Inherit order type from parent course (if exists)
128  }
setOrderType(int $a_value)
+ Here is the call graph for this function:

◆ setFolderTree()

ilObjFolder::setFolderTree ( ilTree  $a_tree)

Definition at line 45 of file class.ilObjFolder.php.

45  : void
46  {
47  $this->folder_tree = $a_tree;
48  }

Field Documentation

◆ $folder_tree

ilTree ilObjFolder::$folder_tree = null

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


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