SlotFilterer
class SlotFilterer (View source)
Responsible for filtering slot templates down to the appropriate ones given design criteria on the board, total content slots in templates, etc.
..
Properties
protected AvailableTemplateCollectionFactory | $availableTemplateCollectionFactory |
Methods
SlotFilterer constructor.
Given an array of potential slot templates, let's reorder them so that we don't just have the same types of templates showing up all the time.
Given a planned instance and a slot number, get all potential templates that could work. This filters out templates not available for the current board instance, as well as templates that have more content slots than what are remaining in the planned instance object.
No description
No description
No description
Details
__construct(AvailableTemplateCollectionFactory $availableTemplateCollectionFactory)
SlotFilterer constructor.
protected array
sortTemplatesForSlotNumber(array $validTemplatesForSlotNumber, int $slot)
Given an array of potential slot templates, let's reorder them so that we don't just have the same types of templates showing up all the time.
array
getPotentialSlotTemplates(PlannedInstance $plannedInstance, int $slot)
Given a planned instance and a slot number, get all potential templates that could work. This filters out templates not available for the current board instance, as well as templates that have more content slots than what are remaining in the planned instance object.
protected
getPossibleContentObjectCollection(PlannedInstance $plannedInstance, SlotTemplate $potentialTemplate)
No description
protected
createValidContentObjectCollection(PlannedInstance $plannedInstance, PossibleContentObjectCollection $possibleContentObjectCollection, int $slot)
No description
PlannedSlotTemplate|null
findValidTemplateForSlot(PlannedInstance $plannedInstance, array $templateChoices, int $slot)
No description