19 declare(strict_types=1);
43 public function preload(array $identification_strings): void
45 $requested = array_diff($identification_strings, $this->preloaded);
46 if ($requested === []) {
49 $r = $this->db->query(
50 "SELECT *, il_resource_revision.title AS revision_title 51 FROM il_resource_revision 52 JOIN il_resource_info ON il_resource_revision.rid = il_resource_info.rid AND il_resource_info.version_number = il_resource_revision.version_number 53 JOIN il_resource ON il_resource_revision.rid = il_resource.rid 54 JOIN il_resource_stkh_u ON il_resource_stkh_u.rid = il_resource.rid 55 JOIN il_resource_stkh ON il_resource_stkh_u.stakeholder_id = il_resource_stkh.id 56 WHERE " . $this->db->in(
'il_resource_revision.rid', $requested,
false,
'text')
58 while (
$d = $this->db->fetchAssoc(
$r)) {
59 $this->resource_repository->populateFromArray(
$d);
60 $this->revision_repository->populateFromArray(
$d);
61 $this->information_repository->populateFromArray(
$d);
62 $this->stakeholder_repository->populateFromArray(
$d);
64 $this->preloaded = array_merge($this->preloaded, $identification_strings);
65 $this->preloaded = array_unique($this->preloaded);
preload(array $identification_strings)
__construct(protected \ilDBInterface $db, Repositories $repositories)
__construct(Container $dic, ilPlugin $plugin)
Class StandardRepositoryPreloader.
Interface RepositoryPreloader.
Class DBRepositoryPreloader.