19 declare(strict_types=1);
52 $this->log = $this->domain->
log();
53 $this->pm = $domain->
page()->page($ref_id);
54 $this->wiki_id = $this->pm->getWikiId();
68 foreach($this->missing_page_repo->getSourcesOfMissingTarget($wiki_id, $title, $lang) as $i) {
81 $this->missing_page_repo->deleteForTarget($wiki_id, $title, $lang);
84 $this->missing_page_repo->deleteForSourceId($wiki_id, $page_id, $lang);
87 $xml = $domdoc->saveXML();
89 foreach ($int_wiki_links as $wlink) {
90 $target_page_id = (
int) $this->pm->getPageIdForTitle($wlink, $lang);
92 if ($target_page_id > 0) {
102 $this->missing_page_repo->save(
126 foreach ($sources as $source) {
127 if ($source[
"type"] ===
"wpg:pg" && $source[
"lang"] ===
$lang) {
128 $ids[] = (
int) $source[
"id"];
133 foreach ($this->pm->getInfoOfSelected($ids,
$lang) as $p) {
Wiki internal data service.
static _getSourcesOfTarget(string $a_target_type, int $a_target_id, int $a_target_inst)
get all sources of a link target
getLinksToPage(int $a_page_id, string $lang="-")
MissingPageDBRepository $missing_page_repo
static _saveLink(string $a_source_type, int $a_source_id, string $a_target_type, int $a_target_id, int $a_target_inst=0, string $a_source_lang="-")
save internal link information
__construct(InternalDataService $data_service, MissingPageDBRepository $missing_page_repo, InternalDomainService $domain, int $ref_id)
InternalDataService $data_service
static collectInternalLinks(string $s, int $a_wiki_id, bool $a_collect_non_ex=false, string $mode=IL_WIKI_MODE_COLLECT)
Collect internal wiki links of a string.
saveInternalLinksForPage(\DOMDocument $domdoc, int $page_id, string $title, string $lang)
InternalDomainService $domain