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

Comments preloader. More...

Public Member Functions

 __construct (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\Hook $hook)
 Hook 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...
 

Protected Attributes

 $data
 

Detailed Description

Comments preloader.

Since
4.1

Definition at line 11 of file Preloader.php.

Constructor & Destructor Documentation

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

Create a preloader.

Parameters
\Elgg\Comments\DataService$dataa dataservice

Definition at line 23 of file Preloader.php.

Member Function Documentation

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

Convert entities to guids.

Parameters

Definition at line 77 of file Preloader.php.

static Elgg\Comments\Preloader::preload ( \Elgg\Hook  $hook)
static

Hook handler for listings to determine if preloading is needed.

Parameters
\Elgg\Hook$hook'view_vars', 'page/components/list'
Returns
void

Definition at line 100 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 47 of file Preloader.php.

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

Preload comments count for a set of items.

Parameters

Definition at line 34 of file Preloader.php.

Member Data Documentation

Elgg\Comments\Preloader::$data
protected

Definition at line 16 of file Preloader.php.


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