ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
arIndexTableGUI Class Reference

GUI-Class arIndexTableGUI. More...

+ Inheritance diagram for arIndexTableGUI:
+ Collaboration diagram for arIndexTableGUI:

Public Member Functions

 __construct (arGUI $a_parent_obj, $a_parent_cmd, ActiveRecordList $active_record_list)
 addMutliItemAction (arIndexTableAction $action)
 getSelectableColumns ()
 Get selectable columns.
 fillRow ($a_set)
 render ()
 txt ($txt, $plugin_txt=true)
 applyFilter ()
 resetFilter ()
 Reset filter.
 setFields (arIndexTableFields $fields)
 getFields ()
 getFieldsAsArray ()
 getField ($field_name)
 addField (arIndexTableField $field)
 setTableTitle ($table_title)
 getTableTitle ()
 setToolbar ($toolbar)
 getToolbar ()
 setActions ($actions)
 getActions ()
 getActionsAsArray ()
 setMultiItemActions ($multi_item_actions)
 getMultiItemActions ()
 getMultiItemActionsAsArray ()
- Public Member Functions inherited from ilTable2GUI
 __construct ($a_parent_obj, $a_parent_cmd="", $a_template_context="")
 Constructor.
 setOpenFormTag ($a_val)
 Set open form tag.
 getOpenFormTag ()
 Get open form tag.
 setCloseFormTag ($a_val)
 Set close form tag.
 getCloseFormTag ()
 Get close form tag.
 determineLimit ()
 Determine the limit.
 determineSelectedColumns ()
 Determine selected columns.
 isColumnSelected ($a_col)
 Is given column selected?
 getSelectedColumns ()
 Get selected columns.
executeCommand ()
 Execute command.
 resetOffset ($a_in_determination=false)
 Reset offset.
 initFilter ()
 Init filter.
 getParentObject ()
 Get parent object.
 getParentCmd ()
 Get parent command.
 setTopAnchor ($a_val)
 Set top anchor.
 getTopAnchor ()
 Get top anchor.
 setNoEntriesText ($a_text)
 Set text for an empty table.
 getNoEntriesText ()
 Get text for an empty table.
 setIsDataTable ($a_val)
 Set is data table.
 getIsDataTable ()
 Get is data table.
 setEnableTitle ($a_enabletitle)
 Set Enable Title.
 getEnableTitle ()
 Get Enable Title.
 setEnableHeader ($a_enableheader)
 Set Enable Header.
 getEnableHeader ()
 Get Enable Header.
 setEnableNumInfo ($a_val)
 Set enable num info.
 getEnableNumInfo ()
 Get enable num info.
 setTitle ($a_title, $a_icon=0, $a_icon_alt=0)
 Set title and title icon.
 setDescription ($a_val)
 Set description.
 getDescription ()
 Get description.
 setOrderField ($a_order_field)
 set order column
 getOrderField ()
 setData ($a_data)
 set table data public
 getData ()
 dataExists ()
 setPrefix ($a_prefix)
 set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) public
 getPrefix ()
 addFilterItem ($a_input_item, $a_optional=false)
 Add filter item.
 addFilterItemByMetaType ($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=NULL)
 Add filter by standard type.
 getFilterItems ($a_optionals=false)
 Get filter items.
 getFilterItemByPostVar ($a_post_var)
 setFilterCols ($a_val)
 Set filter columns.
 getFilterCols ()
 Get filter columns.
 setDisableFilterHiding ($a_val=true)
 Set disable filter hiding.
 getDisableFilterHiding ()
 Get disable filter hiding.
 isFilterSelected ($a_col)
 Is given filter selected?
 getSelectedFilters ()
 Get selected filters.
 determineSelectedFilters ()
 Determine selected filters.
 setCustomPreviousNext ($a_prev_link, $a_next_link)
 Set custom previous/next links.
 setFormAction ($a_form_action, $a_multipart=false)
 Set Form action parameter.
 getFormAction ()
 Get Form action parameter.
 setFormName ($a_formname)
 Set Form name.
 getFormName ()
 Get Form name.
 setId ($a_val)
 Set id.
 getId ()
 Get element id.
 setDisplayAsBlock ($a_val)
 Set display as block.
 getDisplayAsBlock ()
 Get display as block.
 getSelectAllCheckbox ()
 Get the name of the checkbox that should be toggled with a select all button.
 setSelectAllCheckbox ($a_select_all_checkbox)
 Set the name of the checkbox that should be toggled with a select all button.
 setExternalSorting ($a_val)
 Set external sorting.
 getExternalSorting ()
 Get external sorting.
 setFilterCommand ($a_val, $a_caption=null)
 Set filter command.
 getFilterCommand ()
 Get filter command.
 setResetCommand ($a_val, $a_caption=null)
 Set reset filter command.
 getResetCommand ()
 Get reset filter command.
 setExternalSegmentation ($a_val)
 Set external segmentation.
 getExternalSegmentation ()
 Get external segmentation.
 setRowTemplate ($a_template, $a_template_dir="")
 Set row template.
 setDefaultOrderField ($a_defaultorderfield)
 Set Default order field.
 getDefaultOrderField ()
 Get Default order field.
 setDefaultOrderDirection ($a_defaultorderdirection)
 Set Default order direction.
 getDefaultOrderDirection ()
 Get Default order direction.
 clearCommandButtons ()
 addCommandButton ($a_cmd, $a_text, $a_onclick= '', $a_id="", $a_class=null)
 Add Command button.
 addCommandButtonInstance (ilButton $a_button)
 Add Command button instance.
 addSelectionButton ($a_sel_var, $a_options, $a_cmd, $a_text, $a_default_selection= '')
 Add Selection List + Command button.
 addMultiItemSelectionButton ($a_sel_var, $a_options, $a_cmd, $a_text, $a_default_selection= '')
 Add Selection List + Command button for selected items.
 setCloseCommand ($a_link)
 Add command for closing table.
 addMultiCommand ($a_cmd, $a_text)
 Add Command button.
 addHiddenInput ($a_name, $a_value)
 Add Hidden Input field.
 addHeaderCommand ($a_href, $a_text, $a_target="", $a_img="")
 Add Header Command (Link) (Image needed for now)
 setTopCommands ($a_val)
 Set top commands (display command buttons on top of table, too)
 getTopCommands ()
 Get top commands (display command buttons on top of table, too)
 addColumn ($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
 Add a column to the header.
 getNavParameter ()
 setOrderLink ($sort_field, $order_dir)
 fillHeader ()
 determineOffsetAndOrder ($a_omit_offset=false)
 Determine offset and order.
 storeNavParameter ()
 getHTML ()
 Get HTML.
 numericOrdering ($a_field)
 Should this field be sorted numeric?
 writeFilterToSession ()
 Write filter values to session.
 fillFooter ()
 Fill footer row.
 getLinkbar ($a_num)
 Get previous/next linkbar.
 fillHiddenRow ()
 fillActionRow ()
 Fill Action Row.
 setHeaderHTML ($html)
 set header html
 storeProperty ($type, $value)
 Store table property.
 loadProperty ($type)
 Load table property.
 getCurrentState ()
 get current settings for order, limit, columns and filter
 setContext ($id)
 Set context.
 getContext ()
 Get context.
 setShowRowsSelector ($a_value)
 Toggle rows-per-page selector.
 getShowRowsSelector ()
 Get rows-per-page selector state.
 setShowTemplates ($a_value)
 Toggle templates.
 getShowTemplates ()
 Get template state.
 restoreTemplate ($a_name)
 Restore state from template.
 saveTemplate ($a_name)
 Save current state as template.
 deleteTemplate ($a_name)
 Delete template.
 getLimit ()
 Get limit.
 getOffset ()
 Get offset.
 setExportFormats (array $formats)
 Set available export formats.
 setPrintMode ($a_value=false)
 Toogle print mode.
 getPrintMode ()
 Get print mode.
 getExportMode ()
 Was export activated?
 exportData ($format, $send=false)
 Export and optionally send current table data.
 setEnableAllCommand ($a_value)
 Enable actions for all entries in current result.
 setRowSelectorLabel ($row_selector_label)
 getRowSelectorLabel ()
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission.
 getPreventDoubleSubmission ()
 Get prevent double submission.
- Public Member Functions inherited from ilTableGUI
 ilTableGUI ($a_data=0, $a_global_tpl=true)
 Constructor.
 setTemplate (&$a_tpl)
 set template public
getTemplateObject ()
 setHelp ($a_help_page, $a_help_icon, $a_help_icon_alt=0)
 set table help page public
 setHeaderNames ($a_header_names)
 set table header names public
 getColumnCount ()
 Returns the column count based on the number of the header row columns public.
 setHeaderVars ($a_header_vars, $a_header_params=0)
 set table header vars public
 setColumnWidth ($a_column_width)
 set table column widths public
 setOneColumnWidth ($a_column_width, $a_column_number)
 set one table column width public
 setMaxCount ($a_max_count)
 set max.
 setLimit ($a_limit=0, $a_default_limit=0)
 set max.
 setOffset ($a_offset)
 set dataset offset public
 setOrderColumn ($a_order_column=0, $a_default_column=0)
 set order column public
 getOrderColumn ()
 Get order column.
 setOrderDirection ($a_order_direction)
 set order direction public
 getOrderDirection ()
 Get order direction.
 setFooter ($a_style, $a_previous=0, $a_next=0)
 set order direction public
 enable ($a_module_name)
 enables particular modules of table
 disable ($a_module_name)
 diesables particular modules of table
 sortData ()
 renderHeader ()
 setStyle ($a_element, $a_style)
 getStyle ($a_element)
 setBase ($a_base)
 Set Base script name (deprecated, only use this for workarounds).
 getBase ()
 Get Base script name (deprecated, only use this for workarounds).
 clearActionButtons ()
 addActionButton ($btn_name, $btn_value)

Static Public Member Functions

static domid_encode ($id_to_encode)
static domid_decode ($id_to_decode)
- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 Get maximum number of entries to enable actions for all.

Protected Member Functions

 initBeforeParentConstructor ()
 initAfterParentConstructor ()
 initTitle ()
 initFields ()
 customizeFields ()
 To be overridden
 initActions ()
 addAction (arIndexTableAction $action)
 initFormAction ()
 initCommandButtons ()
 initToolbar ()
 getAddButtonTxt ()
 initMultiItemActions ()
 getMultiDeleteTxt ()
 initMultiItemActionsButton ()
 addFilterField (arIndexTableField $field)
 initRowSelector ()
 initTableRowTemplate ()
 addMultipleSelectionColumn ()
 checkColumnVisibile (arIndexTableField $field)
 addFilterWhere (ilFormPropertyGUI $filter, $name, $value)
 addFilterNumericWhere (ilCombinationInputGUI $filter, $name, $value)
 addFilterTextWhere (ilTextInputGUI $filter, $name, $value)
 addFilterDateWhere (ilCombinationInputGUI $filter, $name, $value)
 addFilterDateTimeWhere (ilCombinationInputGUI $filter, $name, $value)
 addFilterCustomWhere ()
 beforeGetData ()
 setOrderAndSegmentation ()
 setEmptyFieldData (arIndexTableField $field, $item)
 setArModifiedByField (arIndexTableField $field, $item, $value)
 setArCreatedByField (arIndexTableField $field, $item, $value)
 setArFieldData (arIndexTableField $field, $item, $value)
 setDateFieldData (arIndexTableField $field, $item, $value)
 setCustomFieldData (arIndexTableField $field, $item)
 setCtrlParametersForRow ($a_set)
 addMultiItemActionCheckboxToRow ($a_set)
 parseRow ($a_set)
 parseEntry (arIndexTableField $field, $value)
- Protected Member Functions inherited from ilTable2GUI
 prepareOutput ()
 Anything that must be done before HTML is generated.
 getFilterValue (ilFormPropertyGUI $a_item)
 Get current filter value.
 SetFilterValue (ilFormPropertyGUI $a_item, $a_value)
 Set current filter value.
 fillMetaExcel ($worksheet, &$a_row)
 Add meta information to excel export.
 fillHeaderExcel ($worksheet, &$a_row)
 Excel Version of Fill Header.
 fillRowExcel ($a_worksheet, &$a_row, $a_set)
 Excel Version of Fill Row.
 fillMetaCSV ($a_csv)
 Add meta information to csv export.
 fillHeaderCSV ($a_csv)
 CSV Version of Fill Header.
 fillRowCSV ($a_csv, $a_set)
 CSV Version of Fill Row.

Protected Attributes

 $ctrl
 $tabs
 $access
 $actions
 $multi_item_actions = array()
 $toolbar = NULL
 $table_title = ''
 $fields = NULL
 arIndexTableFields
 $active_record_list = NULL
 $parent_obj = NULL
- Protected Attributes inherited from ilTable2GUI
 $close_command = ""
 $top_anchor = "il_table_top"
 $filters = array()
 $optional_filters = array()
 $filter_cmd = 'applyFilter'
 $reset_cmd = 'resetFilter'
 $filter_cols = 5
 $ext_sort = false
 $ext_seg = false
 $context = ""
 $mi_sel_buttons = null
 $disable_filter_hiding = false
 $selected_filter = false
 $top_commands = true
 $selectable_columns = array()
 $selected_column = array()
 $show_templates = false
 $show_rows_selector = true
 $nav_determined = false
 $limit_determined = false
 $filters_determined = false
 $columns_determined = false
 $open_form_tag = true
 $close_form_tag = true
 $export_formats
 $export_mode
 $print_mode
 $enable_command_for_all
 $restore_filter
 $restore_filter_values
 $sortable_fields = array()
 $prevent_double_submission = true
 $row_selector_label

Additional Inherited Members

- Data Fields inherited from ilTable2GUI
const FILTER_TEXT = 1
const FILTER_SELECT = 2
const FILTER_DATE = 3
const FILTER_LANGUAGE = 4
const FILTER_NUMBER_RANGE = 5
const FILTER_DATE_RANGE = 6
const FILTER_DURATION_RANGE = 7
const FILTER_DATETIME_RANGE = 8
const EXPORT_EXCEL = 1
const EXPORT_CSV = 2
const ACTION_ALL_LIMIT = 1000

Detailed Description

GUI-Class arIndexTableGUI.

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
2.0.7

Definition at line 16 of file class.arIndexTableGUI.php.

Constructor & Destructor Documentation

arIndexTableGUI::__construct ( arGUI  $a_parent_obj,
  $a_parent_cmd,
ActiveRecordList  $active_record_list 
)
Parameters
arGUI$a_parent_obj
string$a_parent_cmd
ActiveRecordList$active_record_list

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

References $active_record_list, $ilCtrl, initAfterParentConstructor(), initBeforeParentConstructor(), and ilTable2GUI\setId().

{
global $ilCtrl, $ilTabs, $ilAccess;
$this->ctrl = $ilCtrl;
$this->tabs = $ilTabs;
$this->access = $ilAccess;
$this->parent_obj = $a_parent_obj;
$this->active_record_list = $active_record_list;
$this->setId(strtolower(get_class($this->active_record_list->getAR()) . "_index"));
parent::__construct($a_parent_obj, $a_parent_cmd);
}

+ Here is the call graph for this function:

Member Function Documentation

arIndexTableGUI::addAction ( arIndexTableAction  $action)
protected
Parameters
arIndexTableAction$action

Definition at line 138 of file class.arIndexTableGUI.php.

References getActions(), and setActions().

Referenced by initActions().

{
if (!$this->getActions()) {
}
$this->actions->addAction($action);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::addField ( arIndexTableField  $field)
Parameters
arIndexTableField

Definition at line 796 of file class.arIndexTableGUI.php.

References getFields().

{
$this->getFields()->addField($field);
}

+ Here is the call graph for this function:

arIndexTableGUI::addFilterCustomWhere ( )
protected

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

Referenced by addFilterWhere().

{
}

+ Here is the caller graph for this function:

arIndexTableGUI::addFilterDateTimeWhere ( ilCombinationInputGUI  $filter,
  $name,
  $value 
)
protected
Parameters
ilCombinationInputGUI$filter
$name
$value

Definition at line 473 of file class.arIndexTableGUI.php.

References IL_CAL_DATE, and IL_CAL_DATETIME.

Referenced by addFilterWhere().

{
if ($value["from"] != NULL OR $value["to"] != NULL) {
if ($value["from"] == NULL) {
$value["from"] = new ilDateTime("0001-01-01", IL_CAL_DATE);
}
if ($value["to"] == NULL) {
$value["to"] = new ilDateTime("9999-01-01", IL_CAL_DATE);
}
$this->active_record_list->where($this->active_record_list->getAR()->getConnectorContainerName() . "." . $name . " BETWEEN '"
. $value["from"]->get(IL_CAL_DATETIME) . "' AND '" . $value["to"]->get(IL_CAL_DATETIME) . "'");
}
}

+ Here is the caller graph for this function:

arIndexTableGUI::addFilterDateWhere ( ilCombinationInputGUI  $filter,
  $name,
  $value 
)
protected
Parameters
ilCombinationInputGUI$filter
$name
$value

Definition at line 454 of file class.arIndexTableGUI.php.

References IL_CAL_DATE.

Referenced by addFilterWhere().

{
if ($value["from"] != NULL OR $value["to"] != NULL) {
if ($value["from"] == NULL) {
$value["from"] = new ilDateTime("0001-01-01", IL_CAL_DATE);
}
if ($value["to"] == NULL) {
$value["to"] = new ilDateTime("9999-01-01", IL_CAL_DATE);
}
$this->active_record_list->where($this->active_record_list->getAR()->getConnectorContainerName() . "." . $name . " BETWEEN '"
. $value["from"]->get(IL_CAL_DATE) . "' AND '" . $value["to"]->get(IL_CAL_DATE) . "'");
}
}

+ Here is the caller graph for this function:

arIndexTableGUI::addFilterField ( arIndexTableField  $field)
protected
Parameters
arIndexTableField$field

Definition at line 240 of file class.arIndexTableGUI.php.

References ilTable2GUI\addFilterItemByMetaType(), ilTable2GUI\FILTER_DATE_RANGE, ilTable2GUI\FILTER_DATETIME_RANGE, ilTable2GUI\FILTER_NUMBER_RANGE, ilTable2GUI\FILTER_TEXT, arField\getFieldType(), arField\getName(), arViewField\getTxt(), and txt().

{
switch ($field->getFieldType()) {
case 'integer':
case 'float':
$this->addFilterItemByMetaType($field->getName(), self::FILTER_NUMBER_RANGE, false, $this->txt($field->getTxt()));
break;
case 'text':
case 'clob':
$this->addFilterItemByMetaType($field->getName(), self::FILTER_TEXT, false, $this->txt($field->getTxt()));
break;
case 'date':
$this->addFilterItemByMetaType($field->getName(), self::FILTER_DATE_RANGE, false, $this->txt($field->getTxt()));
break;
case 'time':
case 'timestamp':
$this->addFilterItemByMetaType($field->getName(), self::FILTER_DATETIME_RANGE, false, $this->txt($field->getTxt()));
break;
}
}

+ Here is the call graph for this function:

arIndexTableGUI::addFilterNumericWhere ( ilCombinationInputGUI  $filter,
  $name,
  $value 
)
protected
Parameters
ilCombinationInputGUI$filter
$name
$value

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

Referenced by addFilterWhere().

{
if ($value["from"] != "" OR $value["to"] != "") {
if ($value["from"] == "") {
$value["from"] = 0;
}
if ($value["to"] == "") {
$value["to"] = PHP_INT_MAX;
}
$this->active_record_list->where($this->active_record_list->getAR()->getConnectorContainerName() . "." . $name . " >= " . $value["from"]
. " AND " . $this->active_record_list->getAR()->getConnectorContainerName() . "." . $name . " <= " . $value["to"]);
}
}

+ Here is the caller graph for this function:

arIndexTableGUI::addFilterTextWhere ( ilTextInputGUI  $filter,
  $name,
  $value 
)
protected
Parameters
ilTextInputGUI$filter
$name
$value

Definition at line 444 of file class.arIndexTableGUI.php.

Referenced by addFilterWhere().

{
$this->active_record_list->where($this->active_record_list->getAR()->getConnectorContainerName() . "." . $name . " like '%" . $value . "%'");
}

+ Here is the caller graph for this function:

arIndexTableGUI::addFilterWhere ( ilFormPropertyGUI  $filter,
  $name,
  $value 
)
protected
Parameters
ilFormPropertyGUI$filter
$name
$value

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

References addFilterCustomWhere(), addFilterDateTimeWhere(), addFilterDateWhere(), addFilterNumericWhere(), and addFilterTextWhere().

{
switch (get_class($filter)) {
case 'ilTextInputGUI':
$this->addFilterTextWhere($filter, $name, $value);
return;
case 'ilCombinationInputGUI':
if (is_object($value["from"]) || is_object($value["to"])) {
if (get_class($value["from"]) == "ilDateTime" || get_class($value["to"]) == "ilDateTime") {
$this->addFilterDateTimeWhere($filter, $name, $value);
return;
}
if (get_class($value["from"]) == "ilDate" || get_class($value["to"]) == "ilDate") {
$this->addFilterDateWhere($filter, $name, $value);
return;
}
$this->addFilterCustomWhere($filter, $name, $value);
return;
}
$this->addFilterNumericWhere($filter, $name, $value);
break;
default:
$this->addFilterCustomWhere($filter, $name, $value);
return;
}
}

+ Here is the call graph for this function:

arIndexTableGUI::addMultiItemActionCheckboxToRow (   $a_set)
protected
Parameters
$a_set

Definition at line 623 of file class.arIndexTableGUI.php.

References getFields(), and getMultiItemActions().

Referenced by fillRow().

{
if ($this->getMultiItemActions()) {
$this->tpl->setVariable('ID', self::domid_encode($a_set[$this->getFields()->getPrimaryField()->getName()]));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::addMultipleSelectionColumn ( )
protected

Definition at line 313 of file class.arIndexTableGUI.php.

References ilTable2GUI\addColumn(), and getMultiItemActions().

{
if ($this->getMultiItemActions()) {
$this->addColumn("", "", 1);
}
}

+ Here is the call graph for this function:

arIndexTableGUI::addMutliItemAction ( arIndexTableAction  $action)
Parameters
arIndexTableAction$action

Definition at line 190 of file class.arIndexTableGUI.php.

References getMultiItemActions(), and setMultiItemActions().

Referenced by initMultiItemActions().

{
if (!$this->getMultiItemActions()) {
}
$this->multi_item_actions->addAction($action);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::applyFilter ( )

Definition at line 708 of file class.arIndexTableGUI.php.

References ilTable2GUI\resetOffset(), and ilTable2GUI\writeFilterToSession().

{
$this->resetOffset();
$this->initTableData();
}

+ Here is the call graph for this function:

arIndexTableGUI::beforeGetData ( )
protected

Reimplemented in arDeleteGUI.

Definition at line 491 of file class.arIndexTableGUI.php.

{
}
arIndexTableGUI::checkColumnVisibile ( arIndexTableField  $field)
protected
Parameters
arIndexTableField$field
Returns
bool

Definition at line 325 of file class.arIndexTableGUI.php.

References arField\getName(), getSelectableColumns(), arViewField\getVisible(), and ilTable2GUI\isColumnSelected().

Referenced by parseRow().

{
return ($field->getVisible() && !$this->getSelectableColumns()) || $this->isColumnSelected($field->getName());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::customizeFields ( )
protected

To be overridden

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

Referenced by initFields().

{
}

+ Here is the caller graph for this function:

static arIndexTableGUI::domid_decode (   $id_to_decode)
static
Parameters
$id_to_decode
Returns
mixed Decode a DOM id encoded by domid_encode().

Definition at line 747 of file class.arIndexTableGUI.php.

Referenced by arGUI\executeCommand(), and arGUI\multiAction().

{
$decoded_id = "";
if (!empty($id_to_decode)) {
$decoded_id = preg_replace_callback('/__idstart_(.{2})_idend__/', function ($matches) {
return chr(hexdec($matches[1]));
}, $id_to_decode);
}
return $decoded_id;
}

+ Here is the caller graph for this function:

static arIndexTableGUI::domid_encode (   $id_to_encode)
static
Parameters
$id_to_encode
Returns
mixed|null Encode a string for use as a DOM id. Replaces non-alphanumeric characters with an underscore and the hex representation of the character code with letters in lowercase see: http://brightonart.co.uk/blogs/dom-id-encode-php-function

Definition at line 729 of file class.arIndexTableGUI.php.

{
$encoded_id = NULL;
if (!empty($id_to_encode)) {
$encoded_id = preg_replace_callback('/([^a-zA-Z0-9])/', function ($matches) {
return "__idstart_" . strtolower(dechex(ord($matches[0]))) . "_idend__";
}, $id_to_encode);
}
return $encoded_id;
}
arIndexTableGUI::fillRow (   $a_set)
final
Parameters
array$a_set

Reimplemented from ilTable2GUI.

Definition at line 603 of file class.arIndexTableGUI.php.

References addMultiItemActionCheckboxToRow(), parseRow(), and setCtrlParametersForRow().

{
$this->setCtrlParametersForRow($a_set);
$this->parseRow($a_set);
$this->addActionsToRow($a_set);
}

+ Here is the call graph for this function:

arIndexTableGUI::getActions ( )
Returns

Definition at line 844 of file class.arIndexTableGUI.php.

References $actions.

Referenced by addAction(), initMultiItemActions(), and initToolbar().

{
}

+ Here is the caller graph for this function:

arIndexTableGUI::getActionsAsArray ( )
Returns
[]

Definition at line 852 of file class.arIndexTableGUI.php.

{
return $this->actions->getActions();
}
arIndexTableGUI::getAddButtonTxt ( )
protected
Returns
string

Definition at line 167 of file class.arIndexTableGUI.php.

References txt().

Referenced by initToolbar().

{
return $this->txt("add_item");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::getField (   $field_name)
Parameters
$field_name
Returns
arIndexTableField

Definition at line 788 of file class.arIndexTableGUI.php.

References getFields().

Referenced by parseRow().

{
return $this->getFields()->getField($field_name);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::getFields ( )
arIndexTableGUI::getFieldsAsArray ( )
Returns
arIndexTableField[]

Definition at line 778 of file class.arIndexTableGUI.php.

References getFields().

{
return $this->getFields()->getFields();
}

+ Here is the call graph for this function:

arIndexTableGUI::getMultiDeleteTxt ( )
protected
Returns
string

Definition at line 182 of file class.arIndexTableGUI.php.

References txt().

Referenced by initMultiItemActions().

{
return $this->txt("delete", false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::getMultiItemActions ( )
Returns

Definition at line 868 of file class.arIndexTableGUI.php.

References $multi_item_actions.

Referenced by addMultiItemActionCheckboxToRow(), addMultipleSelectionColumn(), addMutliItemAction(), and initMultiItemActionsButton().

+ Here is the caller graph for this function:

arIndexTableGUI::getMultiItemActionsAsArray ( )
Returns

Definition at line 876 of file class.arIndexTableGUI.php.

References $multi_item_actions.

arIndexTableGUI::getSelectableColumns ( )

Get selectable columns.

Returns
array

Reimplemented from ilTable2GUI.

Reimplemented in arDeleteGUI.

Definition at line 211 of file class.arIndexTableGUI.php.

References getFields().

Referenced by checkColumnVisibile().

{
return $this->getFields()->getSelectableColumns($this);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::getTableTitle ( )
Returns
string

Definition at line 812 of file class.arIndexTableGUI.php.

References $table_title.

{
}
arIndexTableGUI::getToolbar ( )
Returns

Definition at line 828 of file class.arIndexTableGUI.php.

References $toolbar.

Referenced by render().

{
}

+ Here is the caller graph for this function:

arIndexTableGUI::initActions ( )
protected

Reimplemented in arDeleteGUI.

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

References $lng, and addAction().

Referenced by initBeforeParentConstructor().

{
global $lng;
$this->addAction(new arIndexTableAction('view', $lng->txt('view'), get_class($this->parent_obj), 'view', 'view'));
$this->addAction(new arIndexTableAction('edit', $lng->txt('edit'), get_class($this->parent_obj), 'edit', 'write'));
$this->addAction(new arIndexTableAction('delete', $lng->txt('delete'), get_class($this->parent_obj), 'delete', 'write'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initAfterParentConstructor ( )
protected

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

References initCommandButtons(), initFormAction(), initRowSelector(), initTableRowTemplate(), and initToolbar().

Referenced by __construct().

{
$this->initFormAction();
$this->initToolbar();
$this->initTableFilter();
$this->initRowSelector();
$this->initTableColumns();
$this->initTableData();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initBeforeParentConstructor ( )
protected

Definition at line 85 of file class.arIndexTableGUI.php.

References initActions(), initFields(), initMultiItemActions(), and initMultiItemActionsButton().

Referenced by __construct().

{
$this->initFields();
$this->initActions();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initCommandButtons ( )
protected

Reimplemented in arDeleteGUI.

Definition at line 151 of file class.arIndexTableGUI.php.

Referenced by initAfterParentConstructor().

{
}

+ Here is the caller graph for this function:

arIndexTableGUI::initFields ( )
protected

Definition at line 112 of file class.arIndexTableGUI.php.

References customizeFields(), and fields.

Referenced by initBeforeParentConstructor().

{
$this->fields = new arIndexTableFields($this->active_record_list->getAR());
$this->customizeFields();
$this->fields->sortFields();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initFormAction ( )
protected

Reimplemented in arDeleteGUI.

Definition at line 146 of file class.arIndexTableGUI.php.

References ilTable2GUI\setFormAction().

Referenced by initAfterParentConstructor().

{
$this->setFormAction($this->ctrl->getFormAction($this->parent_obj));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initMultiItemActions ( )
protected

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

References addMutliItemAction(), getActions(), and getMultiDeleteTxt().

Referenced by initBeforeParentConstructor().

{
if ($this->getActions() && $this->getActions()->getAction("delete")) {
$this->addMutliItemAction(new arIndexTableAction('delete', $this->getMultiDeleteTxt(), get_class($this->parent_obj), 'delete'));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initMultiItemActionsButton ( )
protected

Definition at line 198 of file class.arIndexTableGUI.php.

References ilTable2GUI\addMultiItemSelectionButton(), getMultiItemActions(), ilTable2GUI\setSelectAllCheckbox(), and txt().

Referenced by initBeforeParentConstructor().

{
if ($this->getMultiItemActions()) {
$this->addMultiItemSelectionButton("index_table_multi_action", $this->multi_item_actions->getActionsAsKeyTextArray(), "multiAction", $this->txt('execute', false));
$this->setSelectAllCheckbox("id[]");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initRowSelector ( )
protected

Reimplemented in arDeleteGUI.

Definition at line 275 of file class.arIndexTableGUI.php.

References ilTable2GUI\setShowRowsSelector().

Referenced by initAfterParentConstructor().

{
$this->setShowRowsSelector(true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initTableRowTemplate ( )
protected
Returns
bool returns false, if dynamic template is needed, otherwise implement your own template by $this->setRowTemplate($a_template, $a_template_dir = '')

Definition at line 284 of file class.arIndexTableGUI.php.

References ilTable2GUI\setRowTemplate().

Referenced by initAfterParentConstructor().

{
$this->setRowTemplate('tpl.record_row.html', './Customizing/global/plugins/Libraries/ActiveRecord/');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::initTitle ( )
protected

Definition at line 107 of file class.arIndexTableGUI.php.

References ilTable2GUI\getId(), and setTableTitle().

{
$this->setTableTitle($this->getId());
}

+ Here is the call graph for this function:

arIndexTableGUI::initToolbar ( )
protected

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

References $toolbar, getActions(), getAddButtonTxt(), and setToolbar().

Referenced by initAfterParentConstructor().

{
if ($this->getActions() && $this->getActions()->getAction("edit")) {
$toolbar->addButton($this->getAddButtonTxt(), $this->ctrl->getLinkTarget($this->parent_obj, "add"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::parseEntry ( arIndexTableField  $field,
  $value 
)
protected
Parameters
arIndexTableField$field
mixed$value

Definition at line 647 of file class.arIndexTableGUI.php.

Referenced by parseRow().

{
$this->tpl->setCurrentBlock('entry');
$this->tpl->setVariable('ENTRY_CONTENT', $value);
$this->tpl->parseCurrentBlock('entry');
}

+ Here is the caller graph for this function:

arIndexTableGUI::parseRow (   $a_set)
protected
Parameters
$a_set

Definition at line 633 of file class.arIndexTableGUI.php.

References checkColumnVisibile(), getField(), and parseEntry().

Referenced by fillRow().

{
foreach ($a_set as $key => $value) {
$field = $this->getField($key);
if ($this->checkColumnVisibile($field)) {
$this->parseEntry($field, $value);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::render ( )
Returns
string

Reimplemented from ilTable2GUI.

Definition at line 684 of file class.arIndexTableGUI.php.

References ilTable2GUI\getHTML(), and getToolbar().

{
$index_table_tpl = new ilTemplate("tpl.index_table.html", true, true, "./Customizing/global/plugins/Libraries/ActiveRecord/");
if ($this->getToolbar()) {
$index_table_tpl->setVariable("TOOLBAR", $this->getToolbar()->getHTML());
}
$index_table_tpl->setVariable("TABLE", parent::render());
return $index_table_tpl->get();
}

+ Here is the call graph for this function:

arIndexTableGUI::resetFilter ( )

Reset filter.

Reimplemented from ilTable2GUI.

Definition at line 715 of file class.arIndexTableGUI.php.

References ilTable2GUI\resetOffset().

{
$this->resetOffset();
$this->initTableData();
}

+ Here is the call graph for this function:

arIndexTableGUI::setActions (   $actions)
Parameters
\arIndexTableActions$actions

Definition at line 836 of file class.arIndexTableGUI.php.

References $actions.

Referenced by addAction().

{
$this->actions = $actions;
}

+ Here is the caller graph for this function:

arIndexTableGUI::setArCreatedByField ( arIndexTableField  $field,
  $item,
  $value 
)
protected
Parameters
arIndexTableField$field
$item
$value
Returns
string

Definition at line 541 of file class.arIndexTableGUI.php.

{
$user = new ilObjUser($value);
return $user->getPublicName();
}
arIndexTableGUI::setArFieldData ( arIndexTableField  $field,
  $item,
  $value 
)
protected
Parameters
arIndexTableField$field
$item
$value
Returns
string

Definition at line 555 of file class.arIndexTableGUI.php.

References arField\getFieldType(), and setDateFieldData().

{
switch ($field->getFieldType()) {
case 'integer':
case 'float':
case 'text':
case 'clob':
return $value;
case 'date':
case 'time':
case 'timestamp':
return $this->setDateFieldData($field, $item, $value);
}
return "";
}

+ Here is the call graph for this function:

arIndexTableGUI::setArModifiedByField ( arIndexTableField  $field,
  $item,
  $value 
)
protected
Parameters
arIndexTableField$field
$item
$value
Returns
string

Definition at line 527 of file class.arIndexTableGUI.php.

{
$user = new ilObjUser($value);
return $user->getPublicName();
}
arIndexTableGUI::setCtrlParametersForRow (   $a_set)
protected
Parameters
$a_set

Definition at line 614 of file class.arIndexTableGUI.php.

References getFields().

Referenced by fillRow().

{
$this->ctrl->setParameterByClass(get_class($this->parent_obj), 'ar_id', self::domid_encode($a_set[$this->getFields()->getPrimaryField()
->getName()]));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::setCustomFieldData ( arIndexTableField  $field,
  $item 
)
protected
Parameters
arIndexTableField$field
$item
Returns
string

Definition at line 592 of file class.arIndexTableGUI.php.

{
return "CUSTOM-OVERRIDE: setCustomFieldData";
}
arIndexTableGUI::setDateFieldData ( arIndexTableField  $field,
  $item,
  $value 
)
protected
Parameters
arIndexTableField$field
$item
$value
Returns
string

Definition at line 579 of file class.arIndexTableGUI.php.

References ilDatePresentation\formatDate(), IL_CAL_DATETIME, and IL_CAL_UNIX.

Referenced by setArFieldData().

{
$datetime = new ilDateTime($value, IL_CAL_DATETIME);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arIndexTableGUI::setEmptyFieldData ( arIndexTableField  $field,
  $item 
)
protected
Parameters
arIndexTableField$field
$item
Returns
string

Definition at line 515 of file class.arIndexTableGUI.php.

{
return "";
}
arIndexTableGUI::setFields ( arIndexTableFields  $fields)
Parameters
arIndexTableFields$fields

Definition at line 762 of file class.arIndexTableGUI.php.

References $fields, and fields.

{
$this->fields = $fields;
}
arIndexTableGUI::setMultiItemActions (   $multi_item_actions)
Parameters
\arIndexTableActions$multi_item_actions

Definition at line 860 of file class.arIndexTableGUI.php.

References $multi_item_actions.

Referenced by addMutliItemAction().

{
$this->multi_item_actions = $multi_item_actions;
}

+ Here is the caller graph for this function:

arIndexTableGUI::setOrderAndSegmentation ( )
protected

Definition at line 495 of file class.arIndexTableGUI.php.

References ilTable2GUI\determineLimit(), ilTable2GUI\determineOffsetAndOrder(), ilTable2GUI\getDefaultOrderField(), ilTable2GUI\getLimit(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), and ilTableGUI\setMaxCount().

{
$this->setExternalSorting(true);
if (!$this->getDefaultOrderField()) {
$this->setDefaultOrderField($this->active_record_list->getAR()->getArFieldList()->getPrimaryField()->getName());
}
$this->determineLimit();
$this->setMaxCount($this->active_record_list->count());
$this->active_record_list->orderBy($this->getOrderField(), $this->getOrderDirection());
$this->active_record_list->limit($this->getOffset(), $this->getLimit());
}

+ Here is the call graph for this function:

arIndexTableGUI::setTableTitle (   $table_title)
Parameters
string$table_title

Definition at line 804 of file class.arIndexTableGUI.php.

References $table_title.

Referenced by initTitle().

{
$this->table_title = $table_title;
}

+ Here is the caller graph for this function:

arIndexTableGUI::setToolbar (   $toolbar)
Parameters
\ilToolbarGUI$toolbar

Definition at line 820 of file class.arIndexTableGUI.php.

References $toolbar.

Referenced by initToolbar().

{
$this->toolbar = $toolbar;
}

+ Here is the caller graph for this function:

arIndexTableGUI::txt (   $txt,
  $plugin_txt = true 
)
Parameters
$txt
bool$plugin_txt
Returns
string

Definition at line 703 of file class.arIndexTableGUI.php.

References $txt.

Referenced by addFilterField(), getAddButtonTxt(), getMultiDeleteTxt(), arDeleteGUI\initCommandButtons(), and initMultiItemActionsButton().

{
return $this->parent_obj->txt($txt, $plugin_txt);
}

+ Here is the caller graph for this function:

Field Documentation

arIndexTableGUI::$access
protected

Definition at line 29 of file class.arIndexTableGUI.php.

arIndexTableGUI::$actions
protected

Definition at line 33 of file class.arIndexTableGUI.php.

Referenced by getActions(), and setActions().

arIndexTableGUI::$active_record_list = NULL
protected

Definition at line 53 of file class.arIndexTableGUI.php.

Referenced by __construct().

arIndexTableGUI::$ctrl
protected

Definition at line 21 of file class.arIndexTableGUI.php.

arIndexTableGUI::$fields = NULL
protected

arIndexTableFields

Definition at line 49 of file class.arIndexTableGUI.php.

Referenced by getFields(), and setFields().

arIndexTableGUI::$multi_item_actions = array()
protected
arIndexTableGUI::$parent_obj = NULL
protected

Definition at line 57 of file class.arIndexTableGUI.php.

arIndexTableGUI::$table_title = ''
protected

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

Referenced by getTableTitle(), and setTableTitle().

arIndexTableGUI::$tabs
protected

Definition at line 25 of file class.arIndexTableGUI.php.

arIndexTableGUI::$toolbar = NULL
protected

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

Referenced by getToolbar(), initToolbar(), and setToolbar().


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