Elgg  Version 6.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Elgg\Comments\Preloader Class Reference

Comments preloader. More...

Public Member Functions

 __construct (protected DataService $data)
 Create a preloader. More...
 
 preloadForList (array $items)
 Preload comments count for a set of items. More...
 

Static Public Member Functions

static preload (\Elgg\Event $event)
 Event handler for listings to determine if preloading is needed. More...
 

Protected Member Functions

 preloadCountsFromQuery (array $guids)
 Preload comments count based on guids. More...
 
 getGuidsToPreload (array $items)
 Convert entities to guids. More...
 

Detailed Description

Comments preloader.

Since
4.1

Definition at line 11 of file Preloader.php.

Constructor & Destructor Documentation

Elgg\Comments\Preloader::__construct ( protected DataService  $data)

Create a preloader.

Parameters
\Elgg\Comments\DataService$dataa dataservice

Definition at line 18 of file Preloader.php.

Member Function Documentation

Elgg\Comments\Preloader::getGuidsToPreload ( array  $items)
protected

Convert entities to guids.

Parameters

Definition at line 72 of file Preloader.php.

static Elgg\Comments\Preloader::preload ( \Elgg\Event  $event)
static

Event handler for listings to determine if preloading is needed.

Parameters
\Elgg\Event$event'view_vars', 'page/components/list'
Returns
void

Definition at line 95 of file Preloader.php.

Elgg\Comments\Preloader::preloadCountsFromQuery ( array  $guids)
protected

Preload comments count based on guids.

Parameters
int[]$guids the guids to preload
Returns
void

Definition at line 41 of file Preloader.php.

Elgg\Comments\Preloader::preloadForList ( array  $items)

Preload comments count for a set of items.

Parameters

Definition at line 28 of file Preloader.php.


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