ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ILIAS\Wiki\Page\ImportResolver Class Reference
+ Collaboration diagram for ILIAS\Wiki\Page\ImportResolver:

Public Member Functions

 __construct (protected InternalDataService $data, protected PageDBRepository $page_repo)
 
 getIdForImportId (string $import_id)
 Get latest non-trashed wiki page with import id. More...
 

Detailed Description

Definition at line 25 of file ImportResolver.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Wiki\Page\ImportResolver::__construct ( protected InternalDataService  $data,
protected PageDBRepository  $page_repo 
)

Definition at line 27 of file ImportResolver.php.

30 {
31 }

Member Function Documentation

◆ getIdForImportId()

ILIAS\Wiki\Page\ImportResolver::getIdForImportId ( string  $import_id)

Get latest non-trashed wiki page with import id.

Definition at line 36 of file ImportResolver.php.

36 : int
37 {
38 foreach ($this->page_repo->getPageIdsForImportId($import_id) as $wpage_id) {
40 $ref_ids = \ilObject::_getAllReferences($wiki_id); // will be 0 if import of lm is in progress (new import)
41 if (count($ref_ids) === 0 || \ilObject::_hasUntrashedReference($wiki_id)) {
42 return $wpage_id;
43 }
44 }
45 return 0;
46 }
static _hasUntrashedReference(int $obj_id)
checks whether an object has at least one reference that is not in trash
static _getAllReferences(int $id)
get all reference ids for object ID
static lookupWikiId(int $a_page_id)

References ILIAS\Wiki\Page\Page\$wiki_id, ilObject\_getAllReferences(), ilObject\_hasUntrashedReference(), and ilWikiPage\lookupWikiId().

+ Here is the call graph for this function:

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