configuration = $configuration; $this->view = $view; $this->options = $options; $this->buttonProvider = $buttonProvider; $this->dataProvider = $dataProvider; } public function renderWidgetContent(): string { $this->view->setTemplate('Widget/ListWidget'); $this->view->assignMultiple([ 'items' => $this->getItems(), 'options' => $this->options, 'button' => $this->buttonProvider, 'configuration' => $this->configuration, ]); return $this->view->render(); } protected function getItems(): array { return $this->dataProvider->getTopLikes(); } }