public function collect() {
yield [
serviceRequirement(
'publications',
PublicationService::getCall()->getByKeywords(
['virology', 'cancer'], 10, 0
)
)
];
foreach ($this->publications as $publication) {
yield new WidgetRequirement(
'publicationListItems',
PublicationItem::CLASS,
[ 'publicationId' => $publication->getId(), 'publication' => $publication ]
);
}
}