Lines Matching refs:page

18     /** @var bool whether first headline/title is shown in the page column */
41 * data of the current processed page row
47 public $page = null;
77 /** @var null|mixed data retrieved from metadata array for the current processed page */
122 'page' => true,
173 'desc' => '(required) prepares the table header for the page list',
177 'desc' => '(required) adds a page to the list',
178 'params' => ["page attributes, 'id' required, others optional" => 'array'],
243 * for dis/enabling header: '(no)header', and show titel for page column with '(no)firsthl',
318 if (isset($this->column[$flag]) && $flag !== 'page') {
366 $this->page = null;
383 $columns = ['page', 'date', 'user', 'desc', 'diff', 'summary'];
417 * (required) Add page row to the list, call for every row. In the $page array is 'id' required, other entries are optional.
419 * @param array $page
420 * 'id' => (required) string page id
421 * 'title' => string First headline, otherwise page id; exception: if titleimage is used this is used for the image title&alt attribute
427 * 'summary' => string summary of the last change of the page $meta['last_change']['sum']
434 * 'section' => string id of section, added as #ancher to page url
438 public function addPage($page)
440 $id = $page['id'];
442 $this->page = $page;
446 if (!isset($this->page['draft'])) {
447 $this->page['draft'] = $this->getMeta('type') == 'draft';
469 $this->pages[$sortKey] = $this->page;
471 $this->pages[] = $this->page;
510 * @param array $page see for details @see addPage()
513 protected function renderPageRow($page)
515 $this->page = $page;
518 $id = $this->page['id'];
528 if (empty($this->page['title'])) {
529 $this->page['title'] = str_replace('_', ' ', noNS($id));
531 $title = hsc($this->page['title']);
542 if (isset($this->page['priority'])) {
543 $class .= 'priority' . $this->page['priority'] . ' ';
545 if (!empty($this->page['draft'])) {
548 if (!empty($this->page['class'])) {
549 $class .= $this->page['class'];
604 foreach ($this->pages as $page) {
605 $this->renderPageRow($page);
616 if (!isset($this->page)) {
632 * Page title / link to page
634 * @param string $id page id displayed in this table row
639 if ($this->page['exists']) {
646 if (!empty($this->page['titleimage'])) {
647 $title = '<img src="' . ml($this->page['titleimage']) . '" class="media"';
648 if (!empty($this->page['title'])) {
649 $title .= ' title="' . hsc($this->page['title']) . '" alt="' . hsc($this->page['title']) . '"';
653 $title = hsc($this->page['title']);
657 $section = !empty($this->page['section']) ? '#' . $this->page['section'] : '';
662 return $this->printCell('page', $content);
674 if (empty($this->page['date']) || empty($this->page['exists'])) {
677 return $this->printCell('date', dformat($this->page['date'], $conf['dformat']));
682 * User - page creator or contributors if not set otherwise
688 return $this->printCell('user', $this->page['user']);
714 $desc = $this->page['desc'];
724 * Diff icon / link to diff page
726 * @param string $id page id displayed in this table row
731 // check for page existence
732 if (!isset($this->page['exists'])) {
733 if (!isset($this->page['file'])) {
734 $this->page['file'] = wikiFN($id);
736 $this->page['exists'] = @file_exists($this->page['file']);
742 $url = wl($id, $url_params) . (!empty($this->page['section']) ? '#' . $this->page['section'] : '');
751 * Print the summary from the last page change
755 return $this->printCell('summary', hsc($this->page['summary']));
763 * @param string $id page id displayed in this table row
768 if (!isset($this->page[$col])) {
769 $this->page[$col] = $this->$plugin->td($id, $col);
771 return $this->printCell($col, $this->page[$col]);
803 if (empty($this->page['exists']) || empty($this->page['id'])) {
807 $this->meta = p_get_metadata($this->page['id'], '', METADATA_RENDER_USING_CACHE);
818 * Retrieve page related data
820 * @param string $id page id
824 // check for page existence
825 if (!isset($this->page['exists'])) {
826 if (!isset($this->page['file'])) {
827 $this->page['file'] = wikiFN($id);
829 $this->page['exists'] = @file_exists($this->page['file']);
832 if (empty($this->page['titleimage'])) {
834 if (blank($this->page['title']) && $this->showfirsthl) {
835 $this->page['title'] = $this->getMeta('title');
838 if (blank($this->page['title'])) {
839 $this->page['title'] = str_replace('_', ' ', noNSorNS($id));
849 if (array_key_exists('desc', $this->page)) return;
851 if (strlen($this->page['description']) > 0) {
852 // This condition will become true, when a page-description is given
854 $desc = $this->page['description'];
867 $this->page['desc'] = $desc;
872 if (array_key_exists('summary', $this->page)) return;
875 $this->page['summary'] = $summary;
882 if (array_key_exists('user', $this->page)) return;
915 $this->page['user'] = $content;
923 if (empty($this->page['date']) && !empty($this->page['exists'])) {
925 $this->page['date'] = $this->getMeta('date', 'modified');
927 $this->page['date'] = $this->getMeta('date', 'created');
935 * @param string $id page id
942 $sortKey = $this->page[$this->sortKey] ?? false;
946 $this->page['draft'] = $this->getMeta('type') == 'draft';
950 $this->page['pagename'] = noNS($id);
961 $this->page['ns'] = str_replace(':', "\0", $sortkey);
978 if (!isset($this->page[$col])) {
979 $this->page[$col] = $this->$plugin->td($id, $col);
984 $sortKey = $this->page[$this->sortKey] ?? 9999999999999999; //TODO mostly used for non-existing pages. 999 works only for dates?