Lines Matching defs:page
21 * For when you come from another plugin (such as backlinks) and that you don't want to change the pattern on each page
28 * The array key of an array of related page
32 * This is a fake page ID that is added
33 * to the related page array when the number of backlinks is bigger than the max
39 * @param MarkupPath $page
50 public static function renderForPage(MarkupPath $page, TagAttributes $tagAttributes = null): string
67 $relatedPages = self::getRelatedPagesOrderedByBacklinkCount($page, $max);
88 $html = "Error while trying to create the link for the page ($backlinkId). Error: {$e->getMessage()}";
95 wl($page->getWikiId()) . '?do=backlink',
112 * @param MarkupPath $page
116 public static function getRelatedPagesOrderedByBacklinkCount(MarkupPath $page, ?int $max = null): array
123 $backlinks = ft_backlinks($page->getWikiId(), $ignore_perms = false);
127 $page = array();
128 $page[RelatedTag::RELATED_PAGE_ID_PROP] = $backlink;
129 $page[RelatedTag::RELATED_BACKLINKS_COUNT_PROP] = sizeof(ft_backlinks($backlink, $ignore_perms = false));
130 $related[] = $page;
140 $page = array();
141 $page[RelatedTag::RELATED_PAGE_ID_PROP] = RelatedTag::MORE_PAGE_ID;
142 $related[] = $page;