ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 Should this field be sorted numeric? More...
 
- 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)
 Set table data. More...
 
 getData ()
 
 dataExists ()
 
 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...
 
 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 ()
 get the name of the parent form More...
 
 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)
 set max. More...
 
- 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)
 Standard Version of Fill Row. More...
 
- 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
 
Translations $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 32 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 44 of file class.ilWikiPagesTableGUI.php.

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

References $DIC, $lang, $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().

+ Here is the call graph for this function:

Member Function Documentation

◆ addLanguageColumn()

ilWikiPagesTableGUI::addLanguageColumn ( )
protected

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

140 : void
141 {
142 if ($this->ot->getContentTranslationActivated()) {
143 $this->addColumn($this->lng->txt("language"));
144 }
145 }

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

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTranslationsColumn()

ilWikiPagesTableGUI::addTranslationsColumn ( )
protected

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

147 : void
148 {
149 if ($this->ot->getContentTranslationActivated()) {
150 $this->addColumn($this->lng->txt("wiki_translations"));
151 }
152 }

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

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilWikiPagesTableGUI::fillRow ( array  $a_set)
protected

Standard Version of Fill Row.

Most likely to be overwritten by derived class.

Parameters
array<string,mixed>$a_set data array

Reimplemented from ilTable2GUI.

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

243 : void
244 {
245 $ilCtrl = $this->ctrl;
246
247 if ($this->pg_list_mode === IL_WIKI_NEW_PAGES) {
248 if ($this->ot->getContentTranslationActivated() && $this->pg_list_mode !== IL_WIKI_WHAT_LINKS_HERE) {
249 $l = $a_set["lang"] === "-"
250 ? $this->ot->getBaseLanguage()
251 : $a_set["lang"];
252 $this->tpl->setCurrentBlock("lang");
253 $this->tpl->setVariable("LANG", $this->lng->txt("meta_l_" . $l));
254 $this->tpl->parseCurrentBlock();
255 }
256 $this->tpl->setVariable("TXT_PAGE_TITLE", $a_set["title"]);
257 $this->tpl->setVariable(
258 "DATE",
260 );
261 } elseif ($this->pg_list_mode === IL_WIKI_POPULAR_PAGES) {
262 if ($this->ot->getContentTranslationActivated()) {
263 $l = $a_set["lang"] === "-"
264 ? $this->ot->getBaseLanguage()
265 : $a_set["lang"];
266 $this->tpl->setCurrentBlock("lang");
267 $this->tpl->setVariable("LANG", $this->lng->txt("meta_l_" . $l));
268 $this->tpl->parseCurrentBlock();
269 }
270 $this->tpl->setVariable("TXT_PAGE_TITLE", $a_set["title"]);
271 $this->tpl->setVariable("HITS", $a_set["cnt"]);
272 } else {
273 $this->tpl->setVariable("TXT_PAGE_TITLE", $a_set["title"]);
274 $this->tpl->setVariable(
275 "DATE",
277 );
278 if ($this->ot->getContentTranslationActivated() && $this->pg_list_mode !== IL_WIKI_WHAT_LINKS_HERE) {
279 $this->tpl->setCurrentBlock("lang");
280 $this->tpl->setVariable("LANG", implode(", ", $this->pm->getLanguages($a_set["id"])));
281 $this->tpl->parseCurrentBlock();
282 }
283 }
284 $this->tpl->setVariable(
285 "HREF_PAGE",
286 $this->pm->getPermaLink($a_set["id"], $a_set["lang"] ?? "")
287 );
288
289 // user name
290 $this->tpl->setVariable(
291 "TXT_USER",
293 $a_set["user"] ?? 0,
294 true,
295 true,
296 $ilCtrl->getLinkTarget($this->getParentObject(), $this->getParentCmd())
297 )
298 );
299 }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
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=null)
Default behaviour is:

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

+ Here is the call graph for this function:

◆ getPages()

ilWikiPagesTableGUI::getPages ( )

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

154 : void
155 {
156 $pages = array();
157 $this->setDefaultOrderField("title");
158
159 switch ($this->pg_list_mode) {
161 foreach ($this->link_manager->getLinksToPage($this->page_id, $this->lang) as $pi) {
162 $pages[] = [
163 "date" => $pi->getLastChange(),
164 "id" => $pi->getId(),
165 "user" => $pi->getLastChangedUser(),
166 "title" => $pi->getTitle(),
167 "lang" => $pi->getLanguage()
168 ];
169 }
170 break;
171
173 foreach ($this->pm->getAllPagesInfo() as $pi) {
174 $pages[] = [
175 "date" => $pi->getLastChange(),
176 "id" => $pi->getId(),
177 "user" => $pi->getLastChangedUser(),
178 "title" => $pi->getTitle()
179 ];
180 }
181 break;
182
184 $this->setDefaultOrderField("created");
185 $this->setDefaultOrderDirection("desc");
186 //$pages = ilWikiPage::getNewWikiPages($this->wiki_id);
187 foreach ($this->pm->getNewPages() as $pi) {
188 $pages[] = [
189 "created" => $pi->getCreated(),
190 "id" => $pi->getId(),
191 "user" => $pi->getCreateUser(),
192 "title" => $pi->getTitle(),
193 "lang" => $pi->getLanguage()
194 ];
195 }
196 break;
197
199 $this->setDefaultOrderField("cnt");
200 $this->setDefaultOrderDirection("desc");
201 //$pages = ilWikiPage::getPopularPages($this->wiki_id);
202 foreach ($this->pm->getPopularPages() as $pi) {
203 $pages[] = [
204 "id" => $pi->getId(),
205 "title" => $pi->getTitle(),
206 "lang" => $pi->getLanguage(),
207 "cnt" => $pi->getViewCnt(),
208 ];
209 }
210 break;
211
213 foreach ($this->pm->getOrphanedPages() as $pi) {
214 $pages[] = [
215 "id" => $pi->getId(),
216 "title" => $pi->getTitle(),
217 "date" => $pi->getLastChange()
218 ];
219 }
220 break;
221 }
222
223 if ($pages) {
224 // enable sorting
225 foreach (array_keys($pages) as $idx) {
226 if (isset($pages[$idx]["user"])) {
227 $pages[$idx]["user_sort"] = ilUserUtil::getNamePresentation($pages[$idx]["user"], false, false);
228 }
229 }
230 }
231
232 $this->setData($pages);
233 }
const IL_WIKI_ALL_PAGES
setDefaultOrderField(string $a_defaultorderfield)
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ numericOrdering()

ilWikiPagesTableGUI::numericOrdering ( string  $a_field)

Should this field be sorted numeric?

Reimplemented from ilTable2GUI.

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

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

Field Documentation

◆ $lang

string ilWikiPagesTableGUI::$lang
protected

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

Referenced by __construct().

◆ $link_manager

ILIAS Wiki Links LinkManager ilWikiPagesTableGUI::$link_manager
protected

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

◆ $ot

Translations ilWikiPagesTableGUI::$ot
protected

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

◆ $page_id

int ilWikiPagesTableGUI::$page_id = 0
protected

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

◆ $pg_list_mode

string ilWikiPagesTableGUI::$pg_list_mode = ""
protected

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

◆ $pm

ILIAS Wiki Page PageManager ilWikiPagesTableGUI::$pm
protected

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

◆ $requested_lang

string ilWikiPagesTableGUI::$requested_lang
protected

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

◆ $requested_ref_id

int ilWikiPagesTableGUI::$requested_ref_id
protected

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

◆ $wiki_id

int ilWikiPagesTableGUI::$wiki_id = 0
protected

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


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