ILIAS  trunk Revision v11.0_alpha-1851-ga8564da6fed
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilWikiPagesTableGUI Class Reference

TableGUI class for wiki pages table. More...

+ Inheritance diagram for ilWikiPagesTableGUI:
+ Collaboration diagram for ilWikiPagesTableGUI:

Public Member Functions

 __construct (object $a_parent_obj, string $a_parent_cmd, int $a_wiki_id, string $a_mode=IL_WIKI_ALL_PAGES, int $a_page_id=0, string $lang="-")
 
 getPages ()
 
 numericOrdering (string $a_field)
 
- Public Member Functions inherited from ilTable2GUI
 __construct (?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 determineLimit ()
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 
 isColumnSelected (string $col)
 
 getSelectedColumns ()
 
 resetOffset (bool $a_in_determination=false)
 
 initFilter ()
 
 getParentObject ()
 
 getParentCmd ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setNoEntriesText (string $a_text)
 
 getNoEntriesText ()
 
 setIsDataTable (bool $a_val)
 
 getIsDataTable ()
 
 setEnableTitle (bool $a_enabletitle)
 
 getEnableTitle ()
 
 setEnableHeader (bool $a_enableheader)
 
 getEnableHeader ()
 
 setEnableNumInfo (bool $a_val)
 
 getEnableNumInfo ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setOrderField (string $a_order_field)
 
 getOrderField ()
 
 setData (array $a_data)
 
 getData ()
 
 dataExists ()
 
 setPrefix (string $a_prefix)
 
 getPrefix ()
 
 addFilterItem (ilTableFilterItem $a_input_item, bool $a_optional=false)
 
 addFilterItemByMetaType (string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
 Add filter by standard type. More...
 
 getFilterItems (bool $a_optionals=false)
 
 getFilterItemByPostVar (string $a_post_var)
 
 setFilterCols (int $a_val)
 
 getFilterCols ()
 
 setDisableFilterHiding (bool $a_val=true)
 
 getDisableFilterHiding ()
 
 isFilterSelected (string $a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 
 determineSelectedFilters ()
 
 setCustomPreviousNext (string $a_prev_link, string $a_next_link)
 
 setFormAction (string $a_form_action, bool $a_multipart=false)
 
 getFormAction ()
 
 setFormName (string $a_name="")
 
 getFormName ()
 
 setId (string $a_val)
 
 getId ()
 
 setDisplayAsBlock (bool $a_val)
 
 getDisplayAsBlock ()
 
 setSelectAllCheckbox (string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
 setExternalSorting (bool $a_val)
 
 getExternalSorting ()
 
 setFilterCommand (string $a_val, string $a_caption="")
 
 getFilterCommand ()
 
 setResetCommand (string $a_val, string $a_caption="")
 
 getResetCommand ()
 
 setExternalSegmentation (bool $a_val)
 
 getExternalSegmentation ()
 
 setRowTemplate (string $a_template, string $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField (string $a_defaultorderfield)
 
 getDefaultOrderField ()
 
 setDefaultOrderDirection (string $a_defaultorderdirection)
 
 getDefaultOrderDirection ()
 
 setDefaultFilterVisiblity (bool $a_status)
 
 getDefaultFilterVisibility ()
 
 clearCommandButtons ()
 
 addCommandButton (string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
 addCommandButtonInstance (ilButtonBase $a_button)
 
 addMultiItemSelectionButton (string $a_sel_var, array $a_options, string $a_cmd, string $a_text, string $a_default_selection='')
 
 setCloseCommand (string $a_link)
 
 addMultiCommand (string $a_cmd, string $a_text)
 
 addHiddenInput (string $a_name, string $a_value)
 
 addHeaderCommand (string $a_href, string $a_text, string $a_target="", string $a_img="")
 
 setTopCommands (bool $a_val)
 
 getTopCommands ()
 
 addColumn (string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
 getNavParameter ()
 
 setOrderLink (string $key, string $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder (bool $a_omit_offset=false)
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering (string $a_field)
 Should this field be sorted numeric? More...
 
 render ()
 
 writeFilterToSession ()
 
 resetFilter ()
 
 fillFooter ()
 
 getLinkbar (string $a_num)
 
 fillHiddenRow ()
 
 fillActionRow ()
 
 setHeaderHTML (string $html)
 
 storeProperty (string $type, string $value)
 
 loadProperty (string $type)
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext (string $id)
 
 getContext ()
 
 setShowRowsSelector (bool $a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 
 getLimit ()
 
 getOffset ()
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode (bool $a_value=false)
 
 getPrintMode ()
 
 getExportMode ()
 
 exportData (int $format, bool $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand (bool $a_value)
 
 setRowSelectorLabel (string $row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 
- Public Member Functions inherited from ilTableGUI
 __construct (array $a_data=[], bool $a_global_tpl=true)
 
 setTemplate (ilTemplate $a_tpl)
 
 getTemplateObject ()
 
 setData (array $a_data)
 Set table data. More...
 
 getData ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setHelp (string $a_help_page, string $a_help_icon, string $a_help_icon_alt="")
 
 setHeaderNames (array $a_header_names)
 
 getColumnCount ()
 
 setHeaderVars (array $a_header_vars, array $a_header_params=[])
 
 setColumnWidth (array $a_column_width)
 set table column widths More...
 
 setOneColumnWidth (string $a_column_width, int $a_column_number)
 
 setMaxCount (int $a_max_count)
 set max. More...
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 set max. More...
 
 getLimit ()
 
 setPrefix (string $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) More...
 
 setOffset (int $a_offset)
 set dataset offset More...
 
 getOffset ()
 
 setOrderColumn (string $a_order_column="", string $a_default_column="")
 
 getOrderColumn ()
 
 setOrderDirection (string $a_order_direction)
 
 getOrderDirection ()
 
 setFooter (string $a_style, string $a_previous="", string $a_next="")
 
 enable (string $a_module_name)
 
 disable (string $a_module_name)
 
 sortData ()
 
 render ()
 
 renderHeader ()
 
 setOrderLink (string $key, string $order_dir)
 
 setStyle (string $a_element, string $a_style)
 
 getStyle (string $a_element)
 
 setBase (string $a_base)
 
 getBase ()
 
 getFormName ()
 get the name of the parent form More...
 
 setFormName (string $a_name="cmd")
 
 getSelectAllCheckbox ()
 get the name of the checkbox that should be toggled with a select all button More...
 
 setSelectAllCheckbox (string $a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton (string $btn_name, string $btn_value)
 

Protected Member Functions

 addLanguageColumn ()
 
 addTranslationsColumn ()
 
 fillRow (array $a_set)
 
- Protected Member Functions inherited from ilTable2GUI
 getRequestedValues ()
 
 prepareOutput ()
 Anything that must be done before HTML is generated. More...
 
 isFilterVisible ()
 Check if filter is visible: manually shown (session, db) or default value set. More...
 
 isAdvMDFilter (ilAdvancedMDRecordGUI $a_gui, ilTableFilterItem $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilTableFilterItem $a_item)
 Get current filter value. More...
 
 setFilterValue (ilTableFilterItem $a_item, $a_value)
 
 fillMetaExcel (ilExcel $a_excel, int &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, int &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, int &$a_row, array $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV (ilCSVWriter $a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV (ilCSVWriter $a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV (ilCSVWriter $a_csv, array $a_set)
 CSV Version of Fill Row. More...
 

Protected Attributes

ILIAS Wiki Links LinkManager $link_manager
 
string $requested_lang
 
string $lang
 
ilObjectTranslation $ot
 
ILIAS Wiki Page PageManager $pm
 
int $requested_ref_id
 
int $page_id = 0
 
int $wiki_id = 0
 
string $pg_list_mode = ""
 
- Protected Attributes inherited from ilTable2GUI
string $requested_nav_par2 = ""
 
string $requested_nav_par = ""
 
string $requested_nav_par1 = ""
 
ILIAS Table TableGUIRequest $table_request = null
 
array $selected_columns = []
 
ilCtrl $ctrl
 
object $parent_obj = null
 
string $parent_cmd = ""
 
string $close_command = ""
 
string $top_anchor = "il_table_top"
 
array $filters = array()
 
array $optional_filters = array()
 
string $filter_cmd = 'applyFilter'
 
string $reset_cmd = 'resetFilter'
 
int $filter_cols = 5
 
bool $ext_sort = false
 
bool $ext_seg = false
 
string $context = ""
 
array $mi_sel_buttons = []
 
bool $disable_filter_hiding = false
 
bool $top_commands = true
 
array $selectable_columns = array()
 
array $selected_column = array()
 
bool $show_rows_selector = true
 
bool $rows_selector_off = false
 
bool $nav_determined = false
 
bool $limit_determined = false
 
bool $filters_determined = false
 
bool $columns_determined = false
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
array $export_formats = []
 
int $export_mode = 0
 
bool $print_mode = false
 
bool $enable_command_for_all = false
 
bool $restore_filter = false
 
array $restore_filter_values = []
 
bool $default_filter_visibility = false
 
array $sortable_fields = array()
 
bool $prevent_double_submission = true
 
string $row_selector_label = ""
 
bool $select_all_on_top = false
 
array $sel_buttons = []
 
string $nav_value = ''
 
string $noentriestext = ''
 
string $css_row = ''
 
bool $display_as_block = false
 
string $description = ''
 
string $id = ""
 
bool $custom_prev_next = false
 
string $reset_cmd_txt = ""
 
string $defaultorderfield = ""
 
string $defaultorderdirection = ""
 
array $column = []
 
bool $datatable = false
 
bool $num_info = false
 
bool $form_multipart = false
 
array $row_data = []
 
string $order_field = ""
 
array $selected_filter = []
 
string $form_action = ""
 
string $formname = ""
 
string $sort_order = ""
 
array $buttons = []
 
array $multi = []
 
array $hidden_inputs = []
 
array $header_commands = []
 
string $row_template = ""
 
string $row_template_dir = ""
 
string $filter_cmd_txt = ""
 
string $custom_prev = ""
 
string $custom_next = ""
 
array $raw_post_data = null
 
ilGlobalTemplateInterface $main_tpl
 
- Protected Attributes inherited from ilTableGUI
string $sort_order
 
string $link_params
 
array $header_params
 
 $tpl
 
ilLanguage $lng
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 
- Static Public Member Functions inherited from ilTableGUI
static linkbar (string $AScript, int $AHits, int $ALimit, int $AOffset, array $AParams=array(), array $ALayout=array(), string $prefix='')
 
- 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 FILTER_CHECKBOX = 9
 
const EXPORT_EXCEL = 1
 
const EXPORT_CSV = 2
 
const ACTION_ALL_LIMIT = 1000
 
- Data Fields inherited from ilTableGUI
string $title = ""
 
string $icon = ""
 
string $icon_alt = ""
 
string $help_page = ""
 
string $help_icon = ""
 
string $help_icon_alt = ""
 
array $header_names = []
 
array $header_vars = []
 
array $linkbar_vars = []
 
array $data = []
 
int $column_count = 0
 
array $column_width = []
 
int $max_count = 0
 
int $limit = 0
 
bool $max_limit = false
 
int $offset = 0
 
string $order_column = ""
 
string $order_direction = ""
 
string $footer_style = ""
 
string $footer_previous = ""
 
string $footer_next = ""
 
bool $lang_support = true
 
bool $global_tpl = false
 
string $form_name = ""
 
string $select_all_checkbox = ""
 
array $action_buttons = []
 
string $prefix = ""
 
string $base = ""
 
array $enabled
 
array $styles
 

Detailed Description

TableGUI class for wiki pages table.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilWikiPagesTableGUI::__construct ( object  $a_parent_obj,
string  $a_parent_cmd,
int  $a_wiki_id,
string  $a_mode = IL_WIKI_ALL_PAGES,
int  $a_page_id = 0,
string  $lang = "-" 
)

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

References $DIC, $service, ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), addLanguageColumn(), addTranslationsColumn(), ILIAS\Repository\ctrl(), getPages(), IL_WIKI_NEW_PAGES, IL_WIKI_ORPHANED_PAGES, IL_WIKI_POPULAR_PAGES, IL_WIKI_WHAT_LINKS_HERE, ILIAS\Repository\lng(), ilWikiPage\lookupTitle(), ilTable2GUI\setEnableHeader(), ilTable2GUI\setFormAction(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setShowRowsSelector(), and ilTable2GUI\setTitle().

49  {
50  global $DIC;
51  $this->lang = ($lang == "")
52  ? "-"
53  : $lang;
54  $service = $DIC->wiki()->internal();
55  $gui = $service->gui();
56  $domain = $service->domain();
57  $this->ctrl = $gui->ctrl();
58  $this->lng = $domain->lng();
59  $this->requested_ref_id = $gui
60  ->request()
61  ->getRefId();
62  $this->requested_lang = $gui->request()->getTranslation();
63  $this->pm = $domain->page()->page($this->requested_ref_id);
64  $this->link_manager = $domain->links($this->requested_ref_id);
65  $this->ot = $domain->wiki()->translation($a_wiki_id);
66 
67  parent::__construct($a_parent_obj, $a_parent_cmd);
68  $this->pg_list_mode = $a_mode;
69  $this->wiki_id = $a_wiki_id;
70  $this->page_id = $a_page_id;
71 
72  switch ($this->pg_list_mode) {
73  case IL_WIKI_NEW_PAGES:
74  $this->addColumn($this->lng->txt("created"), "created");
75  $this->addColumn($this->lng->txt("wiki_page"), "title");
76  $this->addLanguageColumn();
77  $this->addColumn($this->lng->txt("wiki_created_by"), "user_sort");
78  $this->setRowTemplate(
79  "tpl.table_row_wiki_new_page.html",
80  "components/ILIAS/Wiki"
81  );
82  break;
83 
85  $this->addColumn($this->lng->txt("wiki_page"), "title");
86  $this->addLanguageColumn();
87  $this->addColumn($this->lng->txt("wiki_page_hits"), "cnt");
88  $this->setRowTemplate(
89  "tpl.table_row_wiki_popular_page.html",
90  "components/ILIAS/Wiki"
91  );
92  break;
93 
95  $this->addColumn($this->lng->txt("wiki_page"), "title");
96  $this->addLanguageColumn();
97  $this->setRowTemplate(
98  "tpl.table_row_wiki_orphaned_page.html",
99  "components/ILIAS/Wiki"
100  );
101  break;
102 
103  default:
104  $this->addColumn($this->lng->txt("wiki_page"), "title");
105  $this->addColumn($this->lng->txt("wiki_last_changed"), "date");
106  if ($this->pg_list_mode !== IL_WIKI_WHAT_LINKS_HERE) {
107  $this->addTranslationsColumn();
108  }
109  $this->addColumn($this->lng->txt("wiki_last_changed_by"), "user_sort");
110  $this->setRowTemplate(
111  "tpl.table_row_wiki_page.html",
112  "components/ILIAS/Wiki"
113  );
114  break;
115  }
116  $this->setEnableHeader(true);
117  $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
118  $this->getPages();
119 
120  $this->setShowRowsSelector(true);
121 
122  switch ($this->pg_list_mode) {
124  $this->setTitle(
125  sprintf(
126  $this->lng->txt("wiki_what_links_to_page"),
127  ilWikiPage::lookupTitle($this->page_id)
128  )
129  );
130  break;
131 
132  default:
133  $this->setTitle($this->lng->txt("wiki_" . $a_mode . "_pages"));
134  break;
135  }
136  }
const IL_WIKI_POPULAR_PAGES
setFormAction(string $a_form_action, bool $a_multipart=false)
static lookupTitle(int $a_page_id, string $lang="-")
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
global $DIC
Definition: shib_login.php:22
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
const IL_WIKI_WHAT_LINKS_HERE
__construct(Container $dic, ilPlugin $plugin)
const IL_WIKI_ORPHANED_PAGES
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
$service
Definition: ltiservices.php:40
setEnableHeader(bool $a_enableheader)
const IL_WIKI_NEW_PAGES
+ Here is the call graph for this function:

Member Function Documentation

◆ addLanguageColumn()

ilWikiPagesTableGUI::addLanguageColumn ( )
protected

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

References ilTable2GUI\addColumn(), and ILIAS\Repository\lng().

Referenced by __construct().

138  : void
139  {
140  if ($this->ot->getContentActivated()) {
141  $this->addColumn($this->lng->txt("language"));
142  }
143  }
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTranslationsColumn()

ilWikiPagesTableGUI::addTranslationsColumn ( )
protected

Definition at line 145 of file class.ilWikiPagesTableGUI.php.

References ilTable2GUI\addColumn(), and ILIAS\Repository\lng().

Referenced by __construct().

145  : void
146  {
147  if ($this->ot->getContentActivated()) {
148  $this->addColumn($this->lng->txt("wiki_translations"));
149  }
150  }
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilWikiPagesTableGUI::fillRow ( array  $a_set)
protected

Definition at line 241 of file class.ilWikiPagesTableGUI.php.

References ilTable2GUI\$ctrl, ilDatePresentation\formatDate(), ilUserUtil\getNamePresentation(), ilTable2GUI\getParentCmd(), IL_CAL_DATETIME, IL_WIKI_NEW_PAGES, IL_WIKI_POPULAR_PAGES, IL_WIKI_WHAT_LINKS_HERE, and ILIAS\Repository\lng().

241  : void
242  {
243  $ilCtrl = $this->ctrl;
244 
245  if ($this->pg_list_mode === IL_WIKI_NEW_PAGES) {
246  if ($this->ot->getContentActivated() && $this->pg_list_mode !== IL_WIKI_WHAT_LINKS_HERE) {
247  $l = $a_set["lang"] === "-"
248  ? $this->ot->getMasterLanguage()
249  : $a_set["lang"];
250  $this->tpl->setCurrentBlock("lang");
251  $this->tpl->setVariable("LANG", $this->lng->txt("meta_l_" . $l));
252  $this->tpl->parseCurrentBlock();
253  }
254  $this->tpl->setVariable("TXT_PAGE_TITLE", $a_set["title"]);
255  $this->tpl->setVariable(
256  "DATE",
258  );
259  } elseif ($this->pg_list_mode === IL_WIKI_POPULAR_PAGES) {
260  if ($this->ot->getContentActivated()) {
261  $l = $a_set["lang"] === "-"
262  ? $this->ot->getMasterLanguage()
263  : $a_set["lang"];
264  $this->tpl->setCurrentBlock("lang");
265  $this->tpl->setVariable("LANG", $this->lng->txt("meta_l_" . $l));
266  $this->tpl->parseCurrentBlock();
267  }
268  $this->tpl->setVariable("TXT_PAGE_TITLE", $a_set["title"]);
269  $this->tpl->setVariable("HITS", $a_set["cnt"]);
270  } else {
271  $this->tpl->setVariable("TXT_PAGE_TITLE", $a_set["title"]);
272  $this->tpl->setVariable(
273  "DATE",
275  );
276  if ($this->ot->getContentActivated() && $this->pg_list_mode !== IL_WIKI_WHAT_LINKS_HERE) {
277  $this->tpl->setCurrentBlock("lang");
278  $this->tpl->setVariable("LANG", implode(", ", $this->pm->getLanguages($a_set["id"])));
279  $this->tpl->parseCurrentBlock();
280  }
281  }
282  $this->tpl->setVariable(
283  "HREF_PAGE",
284  $this->pm->getPermaLink($a_set["id"], $a_set["lang"] ?? "")
285  );
286 
287  // user name
288  $this->tpl->setVariable(
289  "TXT_USER",
291  $a_set["user"] ?? 0,
292  true,
293  true,
294  $ilCtrl->getLinkTarget($this->getParentObject(), $this->getParentCmd())
295  )
296  );
297  }
const IL_CAL_DATETIME
const IL_WIKI_POPULAR_PAGES
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
const IL_WIKI_WHAT_LINKS_HERE
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
const IL_WIKI_NEW_PAGES
+ Here is the call graph for this function:

◆ getPages()

ilWikiPagesTableGUI::getPages ( )

Definition at line 152 of file class.ilWikiPagesTableGUI.php.

References ilUserUtil\getNamePresentation(), IL_WIKI_ALL_PAGES, IL_WIKI_NEW_PAGES, IL_WIKI_ORPHANED_PAGES, IL_WIKI_POPULAR_PAGES, IL_WIKI_WHAT_LINKS_HERE, ilTable2GUI\setData(), ilTable2GUI\setDefaultOrderDirection(), and ilTable2GUI\setDefaultOrderField().

Referenced by __construct().

152  : void
153  {
154  $pages = array();
155  $this->setDefaultOrderField("title");
156 
157  switch ($this->pg_list_mode) {
159  foreach ($this->link_manager->getLinksToPage($this->page_id, $this->lang) as $pi) {
160  $pages[] = [
161  "date" => $pi->getLastChange(),
162  "id" => $pi->getId(),
163  "user" => $pi->getLastChangedUser(),
164  "title" => $pi->getTitle(),
165  "lang" => $pi->getLanguage()
166  ];
167  }
168  break;
169 
170  case IL_WIKI_ALL_PAGES:
171  foreach ($this->pm->getAllPagesInfo() as $pi) {
172  $pages[] = [
173  "date" => $pi->getLastChange(),
174  "id" => $pi->getId(),
175  "user" => $pi->getLastChangedUser(),
176  "title" => $pi->getTitle()
177  ];
178  }
179  break;
180 
181  case IL_WIKI_NEW_PAGES:
182  $this->setDefaultOrderField("created");
183  $this->setDefaultOrderDirection("desc");
184  //$pages = ilWikiPage::getNewWikiPages($this->wiki_id);
185  foreach ($this->pm->getNewPages() as $pi) {
186  $pages[] = [
187  "created" => $pi->getCreated(),
188  "id" => $pi->getId(),
189  "user" => $pi->getCreateUser(),
190  "title" => $pi->getTitle(),
191  "lang" => $pi->getLanguage()
192  ];
193  }
194  break;
195 
197  $this->setDefaultOrderField("cnt");
198  $this->setDefaultOrderDirection("desc");
199  //$pages = ilWikiPage::getPopularPages($this->wiki_id);
200  foreach ($this->pm->getPopularPages() as $pi) {
201  $pages[] = [
202  "id" => $pi->getId(),
203  "title" => $pi->getTitle(),
204  "lang" => $pi->getLanguage(),
205  "cnt" => $pi->getViewCnt(),
206  ];
207  }
208  break;
209 
211  foreach ($this->pm->getOrphanedPages() as $pi) {
212  $pages[] = [
213  "id" => $pi->getId(),
214  "title" => $pi->getTitle(),
215  "date" => $pi->getLastChange()
216  ];
217  }
218  break;
219  }
220 
221  if ($pages) {
222  // enable sorting
223  foreach (array_keys($pages) as $idx) {
224  if (isset($pages[$idx]["user"])) {
225  $pages[$idx]["user_sort"] = ilUserUtil::getNamePresentation($pages[$idx]["user"], false, false);
226  }
227  }
228  }
229 
230  $this->setData($pages);
231  }
setData(array $a_data)
const IL_WIKI_POPULAR_PAGES
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
setDefaultOrderField(string $a_defaultorderfield)
setDefaultOrderDirection(string $a_defaultorderdirection)
const IL_WIKI_WHAT_LINKS_HERE
const IL_WIKI_ALL_PAGES
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const IL_WIKI_ORPHANED_PAGES
const IL_WIKI_NEW_PAGES
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ numericOrdering()

ilWikiPagesTableGUI::numericOrdering ( string  $a_field)

Definition at line 233 of file class.ilWikiPagesTableGUI.php.

233  : bool
234  {
235  if ($a_field === "cnt") {
236  return true;
237  }
238  return false;
239  }

Field Documentation

◆ $lang

string ilWikiPagesTableGUI::$lang
protected

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

◆ $link_manager

ILIAS Wiki Links LinkManager ilWikiPagesTableGUI::$link_manager
protected

Definition at line 32 of file class.ilWikiPagesTableGUI.php.

◆ $ot

ilObjectTranslation ilWikiPagesTableGUI::$ot
protected

Definition at line 35 of file class.ilWikiPagesTableGUI.php.

◆ $page_id

int ilWikiPagesTableGUI::$page_id = 0
protected

Definition at line 38 of file class.ilWikiPagesTableGUI.php.

◆ $pg_list_mode

string ilWikiPagesTableGUI::$pg_list_mode = ""
protected

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

◆ $pm

ILIAS Wiki Page PageManager ilWikiPagesTableGUI::$pm
protected

Definition at line 36 of file class.ilWikiPagesTableGUI.php.

◆ $requested_lang

string ilWikiPagesTableGUI::$requested_lang
protected

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

◆ $requested_ref_id

int ilWikiPagesTableGUI::$requested_ref_id
protected

Definition at line 37 of file class.ilWikiPagesTableGUI.php.

◆ $wiki_id

int ilWikiPagesTableGUI::$wiki_id = 0
protected

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


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