ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader Class Reference

Class StandardRepositoryPreloader. More...

+ Inheritance diagram for ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader:
+ Collaboration diagram for ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader:

Public Member Functions

 __construct (Repositories $repositories)
 
 preload (array $identification_strings)
 
 preloadCollections (array $collection_identification_strings)
 
 preload (array $identification_strings)
 
 preloadCollections (array $collection_identification_strings)
 Preload collections (by their collection identifications) and all resources contained in those collections. More...
 

Protected Attributes

ResourceRepository $resource_repository
 
RevisionRepository $revision_repository
 
InformationRepository $information_repository
 
StakeholderRepository $stakeholder_repository
 
FlavourRepository $flavour_repository
 
CollectionRepository $collection_repository
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::__construct ( Repositories  $repositories)

Definition at line 45 of file StandardRepositoryPreloader.php.

46 {
47 $this->resource_repository = $repositories->getResourceRepository();
48 $this->revision_repository = $repositories->getRevisionRepository();
49 $this->information_repository = $repositories->getInformationRepository();
50 $this->stakeholder_repository = $repositories->getStakeholderRepository();
51 $this->flavour_repository = $repositories->getFlavourRepository();
52 $this->collection_repository = $repositories->getCollectionRepository();
53 }

References ILIAS\ResourceStorage\Repositories\getCollectionRepository(), ILIAS\ResourceStorage\Repositories\getFlavourRepository(), ILIAS\ResourceStorage\Repositories\getInformationRepository(), ILIAS\ResourceStorage\Repositories\getResourceRepository(), ILIAS\ResourceStorage\Repositories\getRevisionRepository(), and ILIAS\ResourceStorage\Repositories\getStakeholderRepository().

+ Here is the call graph for this function:

Member Function Documentation

◆ preload()

ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::preload ( array  $identification_strings)

Implements ILIAS\ResourceStorage\Preloader\RepositoryPreloader.

Reimplemented in ILIAS\ResourceStorage\Preloader\DBRepositoryPreloader.

Definition at line 55 of file StandardRepositoryPreloader.php.

55 : void
56 {
57 $this->resource_repository->preload($identification_strings);
58 $this->revision_repository->preload($identification_strings);
59 $this->information_repository->preload($identification_strings);
60 $this->stakeholder_repository->preload($identification_strings);
61 $this->flavour_repository->preload($identification_strings);
62 }

Referenced by ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader\preloadCollections().

+ Here is the caller graph for this function:

◆ preloadCollections()

ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::preloadCollections ( array  $collection_identification_strings)
Parameters
string[]$collection_identification_strings

Implements ILIAS\ResourceStorage\Preloader\RepositoryPreloader.

Definition at line 67 of file StandardRepositoryPreloader.php.

67 : void
68 {
69 if ($collection_identification_strings === []) {
70 return;
71 }
72 $resource_ids = $this->collection_repository->getResourceIdsForCollections($collection_identification_strings);
73 $resource_ids = array_values(array_unique(
74 array_map(static fn(ResourceIdentification $id) => $id->serialize(), $resource_ids)
75 ));
76
77 if ($resource_ids === []) {
78 return;
79 }
80
81 $this->preload($resource_ids);
82 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, and ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader\preload().

+ Here is the call graph for this function:

Field Documentation

◆ $collection_repository

CollectionRepository ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::$collection_repository
protected

Definition at line 43 of file StandardRepositoryPreloader.php.

◆ $flavour_repository

FlavourRepository ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::$flavour_repository
protected

Definition at line 42 of file StandardRepositoryPreloader.php.

◆ $information_repository

InformationRepository ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::$information_repository
protected

Definition at line 40 of file StandardRepositoryPreloader.php.

◆ $resource_repository

ResourceRepository ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::$resource_repository
protected

Definition at line 38 of file StandardRepositoryPreloader.php.

◆ $revision_repository

RevisionRepository ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::$revision_repository
protected

Definition at line 39 of file StandardRepositoryPreloader.php.

◆ $stakeholder_repository

StakeholderRepository ILIAS\ResourceStorage\Preloader\StandardRepositoryPreloader::$stakeholder_repository
protected

Definition at line 41 of file StandardRepositoryPreloader.php.


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