38 protected \ILIAS\Wiki\Page\PageManager
$pm;
53 $this->lang = ($lang ==
"")
59 $this->
ctrl = $gui->ctrl();
60 $this->
lng = $domain->lng();
61 $this->requested_ref_id = $gui
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);
70 $this->pg_list_mode = $a_mode;
71 $this->wiki_id = $a_wiki_id;
72 $this->page_id = $a_page_id;
74 switch ($this->pg_list_mode) {
79 $this->
addColumn($this->
lng->txt(
"wiki_created_by"),
"user_sort");
81 "tpl.table_row_wiki_new_page.html",
82 "components/ILIAS/Wiki" 89 $this->
addColumn($this->
lng->txt(
"wiki_page_hits"),
"cnt");
91 "tpl.table_row_wiki_popular_page.html",
92 "components/ILIAS/Wiki" 100 "tpl.table_row_wiki_orphaned_page.html",
101 "components/ILIAS/Wiki" 106 $this->
addColumn($this->
lng->txt(
"wiki_page"),
"title");
107 $this->
addColumn($this->
lng->txt(
"wiki_last_changed"),
"date");
111 $this->
addColumn($this->
lng->txt(
"wiki_last_changed_by"),
"user_sort");
113 "tpl.table_row_wiki_page.html",
114 "components/ILIAS/Wiki" 124 switch ($this->pg_list_mode) {
128 $this->
lng->txt(
"wiki_what_links_to_page"),
135 $this->
setTitle($this->
lng->txt(
"wiki_" . $a_mode .
"_pages"));
142 if ($this->ot->getContentTranslationActivated()) {
149 if ($this->ot->getContentTranslationActivated()) {
159 switch ($this->pg_list_mode) {
161 foreach ($this->link_manager->getLinksToPage($this->page_id, $this->lang) as $pi) {
163 "date" => $pi->getLastChange(),
164 "id" => $pi->getId(),
165 "user" => $pi->getLastChangedUser(),
166 "title" => $pi->getTitle(),
167 "lang" => $pi->getLanguage()
173 foreach ($this->pm->getAllPagesInfo() as $pi) {
175 "date" => $pi->getLastChange(),
176 "id" => $pi->getId(),
177 "user" => $pi->getLastChangedUser(),
178 "title" => $pi->getTitle()
187 foreach ($this->pm->getNewPages() as $pi) {
189 "created" => $pi->getCreated(),
190 "id" => $pi->getId(),
191 "user" => $pi->getCreateUser(),
192 "title" => $pi->getTitle(),
193 "lang" => $pi->getLanguage()
202 foreach ($this->pm->getPopularPages() as $pi) {
204 "id" => $pi->getId(),
205 "title" => $pi->getTitle(),
206 "lang" => $pi->getLanguage(),
207 "cnt" => $pi->getViewCnt(),
213 foreach ($this->pm->getOrphanedPages() as $pi) {
215 "id" => $pi->getId(),
216 "title" => $pi->getTitle(),
217 "date" => $pi->getLastChange()
225 foreach (array_keys($pages) as $idx) {
226 if (isset($pages[$idx][
"user"])) {
237 if ($a_field ===
"cnt") {
243 protected function fillRow(array $a_set): void
249 $l = $a_set[
"lang"] ===
"-" 250 ? $this->ot->getBaseLanguage()
252 $this->tpl->setCurrentBlock(
"lang");
253 $this->tpl->setVariable(
"LANG", $this->
lng->txt(
"meta_l_" . $l));
254 $this->tpl->parseCurrentBlock();
256 $this->tpl->setVariable(
"TXT_PAGE_TITLE", $a_set[
"title"]);
257 $this->tpl->setVariable(
262 if ($this->ot->getContentTranslationActivated()) {
263 $l = $a_set[
"lang"] ===
"-" 264 ? $this->ot->getBaseLanguage()
266 $this->tpl->setCurrentBlock(
"lang");
267 $this->tpl->setVariable(
"LANG", $this->
lng->txt(
"meta_l_" . $l));
268 $this->tpl->parseCurrentBlock();
270 $this->tpl->setVariable(
"TXT_PAGE_TITLE", $a_set[
"title"]);
271 $this->tpl->setVariable(
"HITS", $a_set[
"cnt"]);
273 $this->tpl->setVariable(
"TXT_PAGE_TITLE", $a_set[
"title"]);
274 $this->tpl->setVariable(
279 $this->tpl->setCurrentBlock(
"lang");
280 $this->tpl->setVariable(
"LANG", implode(
", ", $this->pm->getLanguages($a_set[
"id"])));
281 $this->tpl->parseCurrentBlock();
284 $this->tpl->setVariable(
286 $this->pm->getPermaLink($a_set[
"id"], $a_set[
"lang"] ??
"")
290 $this->tpl->setVariable(
296 $ilCtrl->getLinkTarget($this->getParentObject(), $this->
getParentCmd())
ILIAS Wiki Links LinkManager $link_manager
const IL_WIKI_POPULAR_PAGES
setFormAction(string $a_form_action, bool $a_multipart=false)
static lookupTitle(int $a_page_id, string $lang="-")
Class handles translation mode for an object.
TableGUI class for wiki pages table.
numericOrdering(string $a_field)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
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)
ILIAS Wiki Page PageManager $pm
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
const IL_WIKI_WHAT_LINKS_HERE
__construct(Container $dic, ilPlugin $plugin)
__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="-")
const IL_WIKI_ORPHANED_PAGES
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...