芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/cms.mgaplay.com.br/lib/Listener/OnDisplayGroupLoad/DisplayGroupScheduleListener.php
. */ namespace Xibo\Listener\OnDisplayGroupLoad; use Xibo\Event\DisplayGroupLoadEvent; use Xibo\Factory\ScheduleFactory; class DisplayGroupScheduleListener { /** * @var ScheduleFactory */ private $scheduleFactory; public function __construct(ScheduleFactory $scheduleFactory) { $this->scheduleFactory = $scheduleFactory; } public function __invoke(DisplayGroupLoadEvent $event) { $displayGroup = $event->getDisplayGroup(); $displayGroup->events = ($displayGroup->displayGroupId != null) ? $this->scheduleFactory->getByDisplayGroupId($displayGroup->displayGroupId) : []; } }