ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjFileListGUI Class Reference

Class ilObjFileListGUI. More...

+ Inheritance diagram for ilObjFileListGUI:
+ Collaboration diagram for ilObjFileListGUI:

Public Member Functions

 ilObjFileListGUI ()
 constructor
 init ()
 initialisation
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="")
 inititialize new item
 getCommandFrame ($a_cmd)
 Get command target frame.
 getIconImageType ()
 Returns the icon image type.
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php
 getProperties ()
 Get item properties.
- Public Member Functions inherited from ilObjectListGUI
 ilObjectListGUI ()
 constructor
 setContainerObject (&$container_obj)
 set the container object (e.g categorygui) Used for link, delete ...
 getContainerObject ()
 get container object
 enableProperties ($a_status)
 En/disable properties.
 getPropertiesStatus ()
 enablePreconditions ($a_status)
 En/disable preconditions.
 getNoticePropertiesStatus ()
 enableNoticeProperties ($a_status)
 En/disable notices.
 getPreconditionsStatus ()
 enableDescription ($a_status)
 En/disable description.
 getDescriptionStatus ()
 enableIcon ($a_status)
 En/Dis-able icons.
 getIconStatus ()
 Are icons enabled?
 enableCheckbox ($a_status)
 En/Dis-able checkboxes.
 getCheckboxStatus ()
 Are checkboxes enabled?
 enableExpand ($a_status)
 En/Dis-able expand/collapse link.
 getExpandStatus ()
 Is expand/collapse enabled.
 setExpanded ($a_status)
 isExpanded ()
 setPositionInputField ($a_field_index, $a_position_value)
 Set position input field.
 enableDelete ($a_status)
 En/disable delete.
 getDeleteStatus ()
 enableCut ($a_status)
 En/disable cut.
 getCutStatus ()
 enableSubscribe ($a_status)
 En/disable subscribe.
 getSubscribeStatus ()
 enablePayment ($a_status)
 En/disable payment.
 getPaymentStatus ()
 enableLink ($a_status)
 En/disable link.
 getLinkStatus ()
 enablePath ($a_path)
 En/disable path.
 getPathStatus ()
 enableCommands ($a_status, $a_std_only=false)
 En/disable commands.
 getCommandsStatus ()
 enableInfoScreen ($a_info_screen)
 En/disable path.
 addSubItemHTML ($a_html)
 Add HTML for subitem (used for sessions)
 getInfoScreenStatus ()
 enableProgressInfo ($a_status)
 enable progress info
 getProgressInfoStatus ()
 get progress info status
 enableSubstitutions ($a_status)
 Enable substitutions.
 getSubstitutionStatus ()
 Get substitution status.
 enableItemDetailLinks ($a_status)
 enable item detail links E.g Direct links to chapters or pages
 getItemDetailLinkStatus ()
 get item detail link status
 setItemDetailLinks ($a_detail_links, $a_intro_txt= '')
 set items detail links
 insertItemDetailLinks ()
 insert item detail links
 setTitle ($a_title)
 setDescription ($a_description)
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php
 getCommandId ()
 get command id Normally the ref id.
 checkCommandAccess ($a_permission, $a_cmd, $a_ref_id, $a_type)
 createDefaultCommand ($command)
 Get default command link Overwritten for e.g categories,courses => they return a goto link If search engine visibility is enabled these object type return a goto_CLIENT_ID_cat_99.html link.
 getCommandLink ($a_cmd)
 Get command link url.
 getProperties ($a_item= '')
 Get item properties.
 addCustomProperty ($a_property="", $a_value="", $a_alert=false, $a_newline=false)
 add custom property
 getCustomProperties ($a_prop)
 get custom properties
 getNoticeProperties ()
 get notice properties
 addCustomCommand ($a_link, $a_lang_var, $a_frame="")
 add a custom command
 getCommands ()
 get all current commands for a specific ref id (in the permission context of the current user)
 insertTitle ()
 insert item title
 insertSubstitutions ()
 Insert substitutions.
 insertDescription ()
 insert item description
 setMode ($a_mode)
 set output mode
 getMode ()
 get output mode
 setConditionDepth ($a_depth)
 set depth for precondition output (stops at level 5)
 isMode ($a_mode)
 check current output mode
 insertProperties ($a_item= '')
 insert properties
 insertNoticeProperties ()
 insertPayment ()
 insert payment information
 insertPreconditions ()
 insert all missing preconditions
 insertCommand ($a_href, $a_text, $a_frame="")
 insert command button
 insertDeleteCommand ()
 insert cut command
 insertLinkCommand ()
 insert link command
 insertCutCommand ()
 insert cut command
 insertSubscribeCommand ()
 insert subscribe command
 insertInfoScreenCommand ()
 insert info screen command
 insertCommands ()
 insert all commands into html code
 appendRepositoryFrameParameter ($a_link)
 workaround: all links into the repository (from outside) must tell repository to setup the frameset
 insertPath ()
 insert path
 insertProgressInfo ()
 insert progress info
 insertIconsAndCheckboxes ()
 Insert icons and checkboxes.
 insertSubItems ()
 Insert subitems.
 insertPositionField ()
 Insert field for positioning.
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output
 getListItemHTML ($a_ref_id, $a_obj_id, $a_title, $a_description)
 Get all item information (title, commands, description) in HTML.
 isSideBlock ()
 Returns whether current item is a block in a side column or not.
 setBoldTitle ($a_bold_title)
 public boolean $a_bold_title set the item title bold
 isTitleBold ()
 public

Additional Inherited Members

- Data Fields inherited from ilObjectListGUI
 $ctrl
 $description_enabled = true
 $preconditions_enabled = true
 $properties_enabled = true
 $notice_properties_enabled = true
 $commands_enabled = true
 $cust_prop = array()
 $cust_commands = array()
 $info_screen_enabled = false
 $condition_depth = 0
 $std_cmd_only = false
 $sub_item_html = array()
- Protected Member Functions inherited from ilObjectListGUI
 insertPaymentCommand ()
- Protected Attributes inherited from ilObjectListGUI
 $substitutions = null
 $substitutions_enabled = false
 $icons_enabled = false
 $checkboxes_enabled = false
 $position_enabled = false
 $progress_enabled = false
 $item_detail_links_enabled = false
 $item_detail_links = array()
 $item_detail_links_intro = ''
 $expand_enabled = false
 $is_expanded = true
 $bold_title = false

Detailed Description

Class ilObjFileListGUI.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Id:
class.ilObjFileListGUI.php 17390 2008-09-13 11:24:55Z wrandels

Definition at line 34 of file class.ilObjFileListGUI.php.

Member Function Documentation

ilObjFileListGUI::getCommandFrame (   $a_cmd)

Get command target frame.

Parameters
string$a_cmdcommand
Returns
string command target frame

Reimplemented from ilObjectListGUI.

Definition at line 86 of file class.ilObjFileListGUI.php.

References ilFrameTargetInfo\_getFrame(), ilPaymentObject\_hasAccess(), ilPaymentObject\_isBuyable(), and ilObjFileAccess\_isFileInline().

{
include_once 'payment/classes/class.ilPaymentObject.php';
if(ilPaymentObject::_isBuyable($this->ref_id) &&
!ilPaymentObject::_hasAccess($this->ref_id))
{
return '';
}
switch($a_cmd)
{
// BEGIN WebDAV: View inline objects in a blank window
case 'sendfile' :
require_once('class.ilObjFileAccess.php');
if (ilObjFileAccess::_isFileInline($this->title))
{
$frame = '_blank';
}
break;
// END WebDAV View inline objects in a blank window
case "":
$frame = ilFrameTargetInfo::_getFrame("RepositoryContent");
break;
default:
}
return $frame;
}

+ Here is the call graph for this function:

ilObjFileListGUI::getIconImageType ( )

Returns the icon image type.

For most objects, this is same as the object type, e.g. 'cat','fold'. We can return here other values, to express a specific state of an object, e.g. 'crs_offline", and/or to express a specific kind of object, e.g. 'file_inline'.

Reimplemented from ilObjectListGUI.

Definition at line 125 of file class.ilObjFileListGUI.php.

References ilObjFileAccess\_isFileInline().

{
include_once('class.ilObjFileAccess.php');
return ilObjFileAccess::_isFileInline($this->title) ? $this->type.'_inline' : $this->type;
}

+ Here is the call graph for this function:

ilObjFileListGUI::getProperties ( )

Get item properties.

Returns
array array of property arrays: "alert" (boolean) => display as an alert property (usually in red) "property" (string) => property name "value" (string) => property value

Definition at line 155 of file class.ilObjFileListGUI.php.

References $lng, ilObjFileAccess\_getFileExtension(), ilObjFileAccess\_lookupFileData(), ilObject\_lookupLastUpdate(), and ilObjFileAccess\_sizeToString().

{
global $lng, $ilUser;
// BEGIN WebDAV: Get parent properties
// END WebDAV: Get parent properties
// to do: implement extra smaller file info object
include_once("./Modules/File/classes/class.ilObjFileAccess.php");
// Display a warning if a file is not a hidden Unix file, and
// the filename extension is missing
if (! preg_match('/^\\.|\\.[a-zA-Z0-9]+$/', $this->title))
{
$props[] = array("alert" => true, "property" => $lng->txt("filename_interoperability"),
"value" => $lng->txt("filename_extension_missing"),
'propertyNameVisible' => false);
}
// BEGIN WebDAV: Only display relevant information.
$props[] = array("alert" => false, "property" => $lng->txt("type"),
"value" => ilObjFileAccess::_getFileExtension($this->title),
'propertyNameVisible' => false
);
$fileData = ilObjFileAccess::_lookupFileData($this->obj_id);
$props[] = array("alert" => false, "property" => $lng->txt("size"),
"value" => ilObjFileAccess::_sizeToString($fileData['file_size'], false),
'propertyNameVisible' => false);
$version = $fileData['version'];
if ($version > 1)
{
$props[] = array("alert" => false, "property" => $lng->txt("version"),
"value" => $version);
}
$props[] = array("alert" => false, "property" => $lng->txt("last_update"),
"value" => ilObject::_lookupLastUpdate($this->obj_id, true),
'propertyNameVisible' => false);
// END WebDAV: Only display relevant information.
return $props;
}

+ Here is the call graph for this function:

ilObjFileListGUI::getTitle ( )

getTitle overwritten in class.ilObjLinkResourceList.php

Returns
string title

Reimplemented from ilObjectListGUI.

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

{
// Remove filename extension from title
return preg_replace('/\\.[a-z0-9]+\\z/i','', $this->title);
}
ilObjFileListGUI::ilObjFileListGUI ( )

constructor

Definition at line 40 of file class.ilObjFileListGUI.php.

References ilObjectListGUI\ilObjectListGUI().

{
$this->ilObjectListGUI();
}

+ Here is the call graph for this function:

ilObjFileListGUI::init ( )

initialisation

Reimplemented from ilObjectListGUI.

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

References ilObjFileAccess\_getCommands().

{
$this->delete_enabled = true;
$this->cut_enabled = true;
$this->subscribe_enabled = true;
$this->link_enabled = true;
$this->payment_enabled = true;
$this->info_screen_enabled = true;
$this->type = "file";
$this->gui_class_name = "ilobjfilegui";
// general commands array
include_once('./Modules/File/classes/class.ilObjFileAccess.php');
$this->commands = ilObjFileAccess::_getCommands();
}

+ Here is the call graph for this function:

ilObjFileListGUI::initItem (   $a_ref_id,
  $a_obj_id,
  $a_title = "",
  $a_description = "" 
)

inititialize new item

Parameters
int$a_ref_idreference id
int$a_obj_idobject id
string$a_titletitle
string$a_descriptiondescription

Reimplemented from ilObjectListGUI.

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

{
parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
}

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