ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 93 of file NewsAggregator.php.

93 : ?NewsAggregationStrategy
94 {
95 return $this->strategies[$object_type] ?? null;
96 }

◆ initializeStrategies()

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

Definition at line 98 of file NewsAggregator.php.

98 : void
99 {
100 $subtree_strategy = new SubtreeAggregationStrategy($this->tree);
101
102 $this->strategies['cat'] = new CategoryAggregationStrategy($this->tree);
103 $this->strategies['crs'] = $subtree_strategy;
104 $this->strategies['grp'] = $subtree_strategy;
105 $this->strategies['fold'] = $subtree_strategy;
106 }

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: