ILIAS  trunk Revision v12.0_alpha-413-g215742c0453
ILIAS\News\Aggregation\NewsAggregator Class Reference

News Aggregator aggregates related contexts for a news context using a layer-wise Batching BFS to aggregate context grouped by objects types in a single iteration. More...

+ Collaboration diagram for ILIAS\News\Aggregation\NewsAggregator:

Public Member Functions

 __construct ()
 

Protected Member Functions

 getStrategy (string $object_type)
 
 initializeStrategies ()
 

Protected Attributes

array $strategies = []
 
ilTree $tree
 

Detailed Description

News Aggregator aggregates related contexts for a news context using a layer-wise Batching BFS to aggregate context grouped by objects types in a single iteration.

Definition at line 30 of file NewsAggregator.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\News\Aggregation\NewsAggregator::__construct ( )

Definition at line 36 of file NewsAggregator.php.

37 {
38 global $DIC;
39
40 $this->tree = $DIC->repositoryTree();
41 $this->initializeStrategies();
42 }
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\News\Aggregation\NewsAggregator\initializeStrategies().

+ Here is the call graph for this function:

Member Function Documentation

◆ getStrategy()

ILIAS\News\Aggregation\NewsAggregator::getStrategy ( string  $object_type)
protected

Definition at line 89 of file NewsAggregator.php.

89 : ?NewsAggregationStrategy
90 {
91 return $this->strategies[$object_type] ?? null;
92 }

◆ initializeStrategies()

ILIAS\News\Aggregation\NewsAggregator::initializeStrategies ( )
protected

Definition at line 94 of file NewsAggregator.php.

94 : void
95 {
96 $subtree_strategy = new SubtreeAggregationStrategy($this->tree);
97
98 $this->strategies['cat'] = new CategoryAggregationStrategy($this->tree);
99 $this->strategies['crs'] = $subtree_strategy;
100 $this->strategies['grp'] = $subtree_strategy;
101 }

Referenced by ILIAS\News\Aggregation\NewsAggregator\__construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $strategies

array ILIAS\News\Aggregation\NewsAggregator::$strategies = []
protected

Definition at line 33 of file NewsAggregator.php.

◆ $tree

ilTree ILIAS\News\Aggregation\NewsAggregator::$tree
protected

Definition at line 34 of file NewsAggregator.php.


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