ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilContainer Class Reference

Class ilContainer. More...

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

Public Member Functions

 ilContainer ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 createContainerDirectory ()
 Create directory for the container.
 getContainerDirectory ()
 Get the container directory.
 _getContainerDirectory ($a_id)
 Get the container directory.
 getBigIconPath ()
 Get path for big icon.
 getSmallIconPath ()
 Get path for small icon.
 getTinyIconPath ()
 Get path for tiny icon.
 setHiddenFilesFound ($a_hiddenfilesfound)
 Set Found hidden files (set by getSubItems).
 getHiddenFilesFound ()
 Get Found hidden files (set by getSubItems).
 getStyleSheetId ()
 get ID of assigned style sheet object
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object
 _lookupContainerSetting ($a_id, $a_keyword)
 Lookup a container setting.
 _writeContainerSetting ($a_id, $a_keyword, $a_value)
 _lookupIconPath ($a_id, $a_size="big")
 lookup icon path
 saveIcons ($a_big_icon, $a_small_icon, $a_tiny_icon)
 save container icons
 removeBigIcon ()
 remove big icon
 removeSmallIcon ()
 remove small icon
 removeTinyIcon ()
 remove tiny icon
 getFirstColumn ()
 Get right column.
 cloneObject ($a_target_id, $a_copy_id=0)
 Clone container settings.
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (container sorting)
 cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false)
 clone all objects according to this container
 getViewMode ()
 Get container view mode.
 getOrderType ()
 Get order type default implementation.
 setOrderType ($a_value)
 getSubItems ($a_admin_panel_enabled=false, $a_include_side_block=false)
 Get subitems of container.
 gotItems ()
 Check whether we got any items.
 addAdditionalSubItemInformation (&$object)
 Add additional information to sub item, e.g.
 getGroupedObjTypes ()
 Get grouped repository object types.
 enablePageEditing ()
 Check whether page editing is allowed for container.
 create ()
 Create.
 update ()
 Update.
 read ()
 read
- Public Member Functions inherited from ilObject
 ilObject ($a_id=0, $a_reference=true)
 Constructor public.
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not)
 read ($a_force_db=false)
 read object data from db into object
 getId ()
 get object id public
 setId ($a_id)
 set object id public
 setRefId ($a_id)
 set reference id public
 getRefId ()
 get reference id public
 getType ()
 get object type public
 setType ($a_type)
 set object type public
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions
 getTitle ()
 get object title public
 getUntranslatedTitle ()
 get untranslated object title public
 setTitle ($a_title)
 set object title
 getDescription ()
 get object description
 setDescription ($a_desc)
 set object description
 getLongDescription ()
 get object long description (stored in object_description)
 getImportId ()
 get import id
 setImportId ($a_import_id)
 set import id
 _lookupObjIdByImportId ($a_import_id)
 getOwner ()
 get object owner
 getOwnerName ()
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id
 setOwner ($a_owner)
 set object owner
 getCreateDate ()
 get create date public
 getLastUpdateDate ()
 get last update date public
 getDiskUsage ()
 Gets the disk usage of the object in bytes.
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class)
 MDUpdateListener ($a_element)
 Meta data update listener.
 createMetaData ()
 create meta data entry
 updateMetaData ()
 update meta data entry
 deleteMetaData ()
 delete meta data entry
 updateOwner ()
 update owner of object in db
 _getIdForImportId ($a_import_id)
 get current object id for import id (static)
 _getAllReferences ($a_id)
 get all reference ids of object
 _lookupOwner ($a_id)
 lookup object owner
 _lookupDescription ($a_id)
 lookup object description
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects.
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static)
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static)
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static)
 _isInTrash ($a_ref_id)
 checks wether object is in trash
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash
 _lookupObjectId ($a_ref_id)
 lookup object id
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
 setPermissions ($a_parent_ref)
 set permissions of object
 createReference ()
 creates reference for object
 countReferences ()
 count references of object
 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!!
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public
 createRoleFolder ()
 creates a local role folder
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event passed, each object may decide how it reacts.
 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.
 cloneMetaData ($target_obj)
 Copy meta data.

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_ILINC = 7
const SORT_TITLE = 0
const SORT_MANUAL = 1
const SORT_ACTIVATION = 2
- Data Fields inherited from ilObject
 $ilias
 $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
 $obj_data_record
 object_data record

Protected Attributes

 $order_type = 0
 $hiddenfilesfound = false

Additional Inherited Members

- Static Public Member Functions inherited from ilObject
static _lookupTitle ($a_id)
 lookup object title
static _getIdsForTitle ($title, $type= '', $partialmatch=false)
static _lookupObjId ($a_id)
static _lookupType ($a_id, $a_reference=false)
 lookup object type
 _exists ($a_id, $a_reference=false)
 checks if an object exists in object_data
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type.
static _prepareCloneSelection ($a_ref_ids, $new_type)
 Prepare copy wizard object selection.
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item.

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:
class.ilContainer.php 23140 2010-03-09 10:43:36Z smeyer

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

Member Function Documentation

ilContainer::_getContainerDirectory (   $a_id)

Get the container directory.

Returns
string container directory

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

References ilUtil\getWebspaceDir().

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

{
return ilUtil::getWebspaceDir()."/container_data/obj_".$a_id;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::_lookupContainerSetting (   $a_id,
  $a_keyword 
)

Lookup a container setting.

Parameters
intcontainer id
stringsetting keyword
Returns
string setting value

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

References $ilDB, $q, and DB_FETCHMODE_ASSOC.

Referenced by ilObject\_getIcon(), _lookupIconPath(), ilObjRootFolderGUI\editObject(), ilContainerGUI\editPageContentObject(), ilContainerGUI\editPageFrameObject(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\getContainerPageHTML(), getFirstColumn(), ilContainerGUI\initStylePropertiesForm(), ilContainerGUI\savePageContentObject(), ilContainerGUI\setTitleAndDescription(), and ilObjRootFolderGUI\setTitleAndDescription().

{
global $ilDB;
$q = "SELECT * FROM container_settings WHERE ".
" id = ".$ilDB->quote($a_id ,'integer')." AND ".
" keyword = ".$ilDB->quote($a_keyword ,'text');
$set = $ilDB->query($q);
$rec = $set->fetchRow(DB_FETCHMODE_ASSOC);
return $rec["value"];
}

+ Here is the caller graph for this function:

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

lookup icon path

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

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

References $file_name, $size, _getContainerDirectory(), and _lookupContainerSetting().

Referenced by ilPDSelectedItemsBlockGUI\addParentRow(), ilShopPurchaseGUI\addStandardRow(), ilContainerGUI\addStandardRow(), ilPDSelectedItemsBlockGUI\addStandardRow(), getBigIconPath(), ilAdministrationExplorer\getImage(), getSmallIconPath(), getTinyIconPath(), ilUtil\getTypeIconPath(), and ilContainerGUI\setTitleAndDescription().

{
if ($a_size == "")
{
$a_size = "big";
}
$size = $a_size;
{
$file_name = $cont_dir."/icon_".$a_size.".gif";
if (is_file($file_name))
{
return $file_name;
}
}
return "";
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References $ilDB, $query, and $res.

Referenced by removeBigIcon(), removeSmallIcon(), removeTinyIcon(), saveIcons(), ilContainerGUI\savePageContentObject(), ilObjRootFolderGUI\updateObject(), and ilContainerGUI\useNewEditorObject().

{
global $ilDB;
$query = "DELETE FROM container_settings WHERE ".
"id = ".$ilDB->quote($a_id,'integer')." ".
"AND keyword = ".$ilDB->quote($a_keyword,'text');
$res = $ilDB->manipulate($query);
$query = "INSERT INTO container_settings (id, keyword, value) VALUES (".
$ilDB->quote($a_id ,'integer').", ".
$ilDB->quote($a_keyword ,'text').", ".
$ilDB->quote($a_value ,'text').
")";
$res = $ilDB->manipulate($query);
}

+ Here is the caller graph for this function:

ilContainer::addAdditionalSubItemInformation ( $object)

Add additional information to sub item, e.g.

used in courses for timings information etc.

Reimplemented in ilObjGroup, ilObjCourse, and ilObjFolder.

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

Referenced by getSubItems().

{
}

+ Here is the caller graph for this function:

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

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
Returns
new refid if clone has finished or parameter ref id if cloning is still in progress

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

References $client_id, $ilErr, $ilLog, ilObject\$ref_id, $res, ilCopyWizardOptions\_allocateCopyId(), ilCopyWizardOptions\_getInstance(), ilCopyWizardOptions\_isFinished(), ilObject\_lookupObjId(), ilObject\_lookupType(), duplicate_session(), and ilSoapFunctions\ilClone().

{
global $ilLog;
include_once('classes/class.ilLink.php');
include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
global $ilAccess,$ilErr,$rbacsystem,$tree,$ilUser;
// Save wizard options
$wizard_options = ilCopyWizardOptions::_getInstance($copy_id);
$wizard_options->saveOwner($ilUser->getId());
$wizard_options->saveRoot($clone_source);
// add entry for source container
$wizard_options->initContainer($clone_source, $ref_id);
foreach($options as $source_id => $option)
{
$wizard_options->addEntry($source_id,$option);
}
$wizard_options->read();
$wizard_options->storeTree($clone_source);
// Special handling for course in existing courses
if($new_type == 'crs' and ilObject::_lookupType(ilObject::_lookupObjId($ref_id)) == 'crs')
{
$ilLog->write(__METHOD__.': Copy course in course...');
$ilLog->write(__METHOD__.': Added mapping, source ID: '.$clone_source.', target ID: '.$ref_id);
$wizard_options->read();
$wizard_options->dropFirstNode();
$wizard_options->appendMapping($clone_source,$ref_id);
}
#print_r($options);
// Duplicate session to avoid logout problems with backgrounded SOAP calls
$new_session_id = duplicate_session($session_id);
// Start cloning process using soap call
include_once 'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
$soap_client = new ilSoapClient();
$soap_client->setTimeout(30);
$soap_client->setResponseTimeout(30);
$soap_client->enableWSDL(true);
$ilLog->write(__METHOD__.': Trying to call Soap client...');
if($soap_client->init())
{
$ilLog->write(__METHOD__.': Calling soap clone method...');
$res = $soap_client->call('ilClone',array($new_session_id.'::'.$client_id, $copy_id));
}
else
{
$ilLog->write(__METHOD__.': SOAP call failed. Calling clone method manually. ');
$wizard_options->disableSOAP();
$wizard_options->read();
include_once('./webservice/soap/include/inc.soap_functions.php');
$res = ilSoapFunctions::ilClone($new_session_id.'::'.$client_id, $copy_id);
}
// Check if copy is in progress or if this has been called by soap (don't wait for finishing)
if($soap_call || ilCopyWizardOptions::_isFinished($copy_id))
{
return $res;
}
else
{
return $ref_id;
}
}

+ Here is the call graph for this function:

ilContainer::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone object dependencies (container sorting)

public

Parameters
inttarget ref id of new course
intcopy id return bool

Reimplemented from ilObject.

Reimplemented in ilObjCourse, ilObjGroup, and ilObjFolder.

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

References ilContainerSorting\_getInstance(), and ilObject\getId().

{
include_once('./Services/Container/classes/class.ilContainerSorting.php');
ilContainerSorting::_getInstance($this->getId())->cloneSorting($a_target_id,$a_copy_id);
return true;
}

+ Here is the call graph for this function:

ilContainer::cloneObject (   $a_target_id,
  $a_copy_id = 0 
)

Clone container settings.

public

Parameters
inttarget ref_id
intcopy id
Returns
object new object

Reimplemented from ilObject.

Reimplemented in ilObjCourse, ilObjGroup, ilObjCategory, and ilObjFolder.

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

References ilPageObject\_exists(), ilObject\getId(), getOrderType(), ilObject\getType(), and ilContainerSortingSettings\setSortMode().

{
$new_obj = parent::cloneObject($a_target_id,$a_copy_id);
include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
$sorting = new ilContainerSortingSettings($new_obj->getId());
$sorting->setSortMode($this->getOrderType());
$sorting->update();
// copy content page
include_once("./Services/COPage/classes/class.ilPageObject.php");
$this->getId()))
{
$orig_page = new ilPageObject($this->getType(), $this->getId());
$new_page_object = new ilPageObject($this->getType());
$new_page_object->setParentId($new_obj->getId());
$new_page_object->setId($new_obj->getId());
$new_page_object->createFromXML();
$new_page_object->setXMLContent($orig_page->getXMLContent());
$new_page_object->buildDom();
$new_page_object->update();
}
return $new_obj;
}

+ Here is the call graph for this function:

ilContainer::create ( )

Create.

Reimplemented from ilObject.

Reimplemented in ilObjGroup.

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

References $ret, ilObject\getId(), getStyleSheetId(), and ilObjStyleSheet\writeStyleUsage().

Referenced by ilObjCourse\create().

{
if (((int) $this->getStyleSheetId()) > 0)
{
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
}
return $ret;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::createContainerDirectory ( )

Create directory for the container.

It is <webspace_dir>/container_data.

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

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

Referenced by saveIcons().

{
$webspace_dir = ilUtil::getWebspaceDir();
$cont_dir = $webspace_dir."/container_data";
if (!is_dir($cont_dir))
{
ilUtil::makeDir($cont_dir);
}
$obj_dir = $cont_dir."/obj_".$this->getId();
if (!is_dir($obj_dir))
{
ilUtil::makeDir($obj_dir);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::enablePageEditing ( )

Check whether page editing is allowed for container.

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

References $ilSetting.

{
global $ilSetting;
// @todo: this will need a more general approach
if ($ilSetting->get("enable_cat_page_edit"))
{
return true;
}
}
ilContainer::getBigIconPath ( )

Get path for big icon.

Returns
string icon path

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

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

Referenced by ilObjCategory\cloneObject(), ilObjGroup\cloneObject(), and ilObjCourse\cloneObject().

{
return ilContainer::_lookupIconPath($this->getId(), "big");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::getContainerDirectory ( )

Get the container directory.

Returns
string container directory

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

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

Referenced by removeBigIcon(), removeSmallIcon(), removeTinyIcon(), and saveIcons().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::getFirstColumn ( )

Get right column.

Returns
object column object

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

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

{
$col_id = ilContainer::_lookupContainerSetting($this->getId(), "first_column");
if ($col_id > 0)
{
include_once("./Services/Blocks/class.ilBlockColumn.php");
$block_column = new ilBlockColumn($col_id);
return $block_column;
}
return false;
}

+ Here is the call graph for this function:

ilContainer::getGroupedObjTypes ( )

Get grouped repository object types.

Returns
array array of object types

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

References ilObject\getType().

Referenced by getSubItems().

{
global $objDefinition;
if (empty($this->type_grps))
{
$this->type_grps = $objDefinition->getGroupedRepositoryObjectTypes($this->getType());
}
return $this->type_grps;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::getHiddenFilesFound ( )

Get Found hidden files (set by getSubItems).

Returns
boolean Found hidden files (set by getSubItems)

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

References $hiddenfilesfound.

ilContainer::getOrderType ( )

Get order type default implementation.

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

References SORT_TITLE.

Referenced by cloneObject(), ilObjCourse\cloneSettings(), and ilObjCourse\update().

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

+ Here is the caller graph for this function:

ilContainer::getSmallIconPath ( )

Get path for small icon.

Returns
string icon path

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

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

Referenced by ilObjCategory\cloneObject(), ilObjGroup\cloneObject(), and ilObjCourse\cloneObject().

{
return ilContainer::_lookupIconPath($this->getId(), "small");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::getStyleSheetId ( )

get ID of assigned style sheet object

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

Referenced by create(), and update().

{
return $this->style_id;
}

+ Here is the caller graph for this function:

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

Get subitems of container.

Parameters
booladministration panel enabled
boolside blocks enabled
Returns
array

Reimplemented in ilObjCourse.

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

References $ilBench, $key, ilObject\$type, ilContainerSorting\_getInstance(), ilEventItems\_getItemsOfContainer(), ilObjFileAccess\_isFileHidden(), addAdditionalSubItemInformation(), getGroupedObjTypes(), ilObject\getId(), ilObject\getRefId(), and setHiddenFilesFound().

{
global $objDefinition, $ilBench, $tree;
// Caching
if (is_array($this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]))
{
return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
}
$type_grps = $this->getGroupedObjTypes();
$objects = $tree->getChilds($this->getRefId(), "title");
$found = false;
include_once('Services/Container/classes/class.ilContainerSorting.php');
$sort = ilContainerSorting::_getInstance($this->getId());
// TODO: check this
// get items attached to a session
include_once './Modules/Session/classes/class.ilEventItems.php';
$event_items = ilEventItems::_getItemsOfContainer($this->getRefId());
foreach ($objects as $key => $object)
{
// hide object types in devmode
if ($objDefinition->getDevMode($object["type"]) || $object["type"] == "adm"
|| $object["type"] == "rolf")
{
continue;
}
// BEGIN WebDAV: Don't display hidden Files, Folders and Categories
if (in_array($object['type'], array('file','fold','cat')))
{
include_once 'Modules/File/classes/class.ilObjFileAccess.php';
if (ilObjFileAccess::_isFileHidden($object['title']))
{
$this->setHiddenFilesFound(true);
if (!$a_admin_panel_enabled)
{
continue;
}
}
}
// END WebDAV: Don't display hidden Files, Folders and Categories
// filter out items that are attached to an event
if (in_array($object['ref_id'],$event_items))
{
continue;
}
// filter side block items
if(!$a_include_side_block && $objDefinition->isSideBlock($object['type']))
{
continue;
}
// group object type groups together (e.g. learning resources)
$type = $objDefinition->getGroupOfObj($object["type"]);
if ($type == "")
{
$type = $object["type"];
}
$this->items[$type][$key] = $object;
$this->items["_all"][$key] = $object;
if ($object["type"] != "sess")
{
$this->items["_non_sess"][$key] = $object;
}
}
$this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block]
= $sort->sortItems($this->items);
return $this->items[(int) $a_admin_panel_enabled][(int) $a_include_side_block];
}

+ Here is the call graph for this function:

ilContainer::getTinyIconPath ( )

Get path for tiny icon.

Returns
string icon path

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

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

Referenced by ilObjCategory\cloneObject(), ilObjGroup\cloneObject(), and ilObjCourse\cloneObject().

{
return ilContainer::_lookupIconPath($this->getId(), "tiny");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::getViewMode ( )

Get container view mode.

Reimplemented in ilObjGroup, ilObjCourse, ilObjFolder, and ilObjiLincCourse.

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

References VIEW_BY_TYPE.

ilContainer::gotItems ( )

Check whether we got any items.

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

{
if (is_array($this->items["_all"]) && count($this->items["_all"]) > 0)
{
return true;
}
return false;
}
ilContainer::ilContainer (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor public.

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

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

Referenced by ilObjCategory\ilObjCategory().

{
parent::__construct($a_id, $a_call_by_reference);
}

+ Here is the caller graph for this function:

ilContainer::read ( )

read

public

Parameters
@return

Reimplemented in ilObjGroup, ilObjFolder, and ilObjiLincCourse.

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

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

Referenced by ilObjCourse\read().

{
include_once("./Services/Container/classes/class.ilContainerSortingSettings.php");
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainer::removeBigIcon ( )

remove big icon

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

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

{
$cont_dir = $this->getContainerDirectory();
$big_file_name = $cont_dir."/icon_big.gif";
@unlink($big_file_name);
ilContainer::_writeContainerSetting($this->getId(), "icon_big", 0);
}

+ Here is the call graph for this function:

ilContainer::removeSmallIcon ( )

remove small icon

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

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

{
$cont_dir = $this->getContainerDirectory();
$small_file_name = $cont_dir."/icon_small.gif";
@unlink($small_file_name);
ilContainer::_writeContainerSetting($this->getId(), "icon_small", 0);
}

+ Here is the call graph for this function:

ilContainer::removeTinyIcon ( )

remove tiny icon

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

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

{
$cont_dir = $this->getContainerDirectory();
$tiny_file_name = $cont_dir."/icon_tiny.gif";
@unlink($tiny_file_name);
ilContainer::_writeContainerSetting($this->getId(), "icon_tiny", 0);
}

+ Here is the call graph for this function:

ilContainer::saveIcons (   $a_big_icon,
  $a_small_icon,
  $a_tiny_icon 
)

save container icons

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

References $cmd, $ilDB, _writeContainerSetting(), createContainerDirectory(), ilUtil\escapeShellArg(), getContainerDirectory(), ilUtil\getConvertCmd(), and ilObject\getId().

{
global $ilDB;
$cont_dir = $this->getContainerDirectory();
// save big icon
$big_geom = $this->ilias->getSetting("custom_icon_big_width")."x".
$this->ilias->getSetting("custom_icon_big_height");
$big_file_name = $cont_dir."/icon_big.gif";
if (is_file($a_big_icon))
{
$a_big_icon = ilUtil::escapeShellArg($a_big_icon);
$big_file_name = ilUtil::escapeShellArg($big_file_name);
$cmd = ilUtil::getConvertCmd()." ".$a_big_icon."[0] -geometry $big_geom GIF:$big_file_name";
system($cmd);
}
if (is_file($cont_dir."/icon_big.gif"))
{
ilContainer::_writeContainerSetting($this->getId(), "icon_big", 1);
}
else
{
ilContainer::_writeContainerSetting($this->getId(), "icon_big", 0);
}
// save small icon
$small_geom = $this->ilias->getSetting("custom_icon_small_width")."x".
$this->ilias->getSetting("custom_icon_small_height");
$small_file_name = $cont_dir."/icon_small.gif";
if (is_file($a_small_icon))
{
$a_small_icon = ilUtil::escapeShellArg($a_small_icon);
$small_file_name = ilUtil::escapeShellArg($small_file_name);
$cmd = ilUtil::getConvertCmd()." ".$a_small_icon."[0] -geometry $small_geom GIF:$small_file_name";
system($cmd);
}
if (is_file($cont_dir."/icon_small.gif"))
{
ilContainer::_writeContainerSetting($this->getId(), "icon_small", 1);
}
else
{
ilContainer::_writeContainerSetting($this->getId(), "icon_small", 0);
}
// save tiny icon
$tiny_geom = $this->ilias->getSetting("custom_icon_tiny_width")."x".
$this->ilias->getSetting("custom_icon_tiny_height");
$tiny_file_name = $cont_dir."/icon_tiny.gif";
if (is_file($a_tiny_icon))
{
$a_tiny_icon = ilUtil::escapeShellArg($a_tiny_icon);
$tiny_file_name = ilUtil::escapeShellArg($tiny_file_name);
$cmd = ilUtil::getConvertCmd()." ".$a_tiny_icon."[0] -geometry $tiny_geom GIF:$tiny_file_name";
system($cmd);
}
if (is_file($cont_dir."/icon_tiny.gif"))
{
ilContainer::_writeContainerSetting($this->getId(), "icon_tiny", 1);
}
else
{
ilContainer::_writeContainerSetting($this->getId(), "icon_tiny", 0);
}
}

+ Here is the call graph for this function:

ilContainer::setHiddenFilesFound (   $a_hiddenfilesfound)

Set Found hidden files (set by getSubItems).

Parameters
boolean$a_hiddenfilesfoundFound hidden files (set by getSubItems)

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

Referenced by getSubItems().

{
$this->hiddenfilesfound = $a_hiddenfilesfound;
}

+ Here is the caller graph for this function:

ilContainer::setOrderType (   $a_value)

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

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

{
$this->order_type = $a_value;
}

+ Here is the caller graph for this function:

ilContainer::setStyleSheetId (   $a_style_id)

set ID of assigned style sheet object

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

Referenced by read().

{
$this->style_id = $a_style_id;
}

+ Here is the caller graph for this function:

ilContainer::update ( )

Update.

Reimplemented from ilObject.

Reimplemented in ilObjCourse, ilObjGroup, and ilObjiLincCourse.

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

References $ret, ilObject\getId(), getStyleSheetId(), and ilObjStyleSheet\writeStyleUsage().

{
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
return $ret;
}

+ Here is the call graph for this function:

Field Documentation

ilContainer::$hiddenfilesfound = false
protected

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

Referenced by getHiddenFilesFound().

ilContainer::$order_type = 0
protected

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

const ilContainer::VIEW_ARCHIVE = 3

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

const ilContainer::VIEW_BY_TYPE = 5
const ilContainer::VIEW_ILINC = 7
const ilContainer::VIEW_INHERIT = 6

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

const ilContainer::VIEW_OBJECTIVE = 1
const ilContainer::VIEW_SESSIONS = 0
const ilContainer::VIEW_SIMPLE = 4
const ilContainer::VIEW_TIMING = 2

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