class ItemSegmenter implements LoggerAwareInterface (View source)

Traits

Trait LoggerAwareTrait A trait used with LoggerAwareInterface

LoggerAwareTrait

Properties

protected EntityManager $entityManager

Methods

getLoggerChannel()

No description

__construct(EntityManager $entityManager)

No description

array
getBoardItemsForInstance(Instance $instance)

Responsible for Getting board data items and returning them. This may involve taking a sub-set of all data objects, for example, or it may involve complex weighting. Used by create board instance commands and other commands that populate content into boards.

filterItemsByDataSource(Instance $instance, array $items)

Goes through each item returned for inclusion in the potential instance. Looks at all the configurations present in the instance, and allows each configuration to optionally prune items out based on criteria they don't like.

Details

getLoggerChannel()

No description

__construct(EntityManager $entityManager)

No description

Parameters

EntityManager $entityManager

array getBoardItemsForInstance(Instance $instance)

Responsible for Getting board data items and returning them. This may involve taking a sub-set of all data objects, for example, or it may involve complex weighting. Used by create board instance commands and other commands that populate content into boards.

Parameters

Instance $instance

Instance

Return Value

array

protected filterItemsByDataSource(Instance $instance, array $items)

Goes through each item returned for inclusion in the potential instance. Looks at all the configurations present in the instance, and allows each configuration to optionally prune items out based on criteria they don't like.

Q: Why does this happen at this level instead of at the data pool population level? A: In theory, we should be able to populate the board over time, with the data pool remaining mostly stable. That means that if we're trying to keep X duplicate occurrences out of a board, we don't want the occurrences to never be in the data pool, because then as the board exists over time new occurrences will never make it into the board. That's why we need to move this population logic into this method, which uses the whole data pool and then prunes before including in a particular front-end instance.

Parameters

Instance $instance
array $items