/** * @return void */ public function placeWidgetsToLayoutBlocks() { $this->registeredWidgets->each(function (WidgetCollectionItem $widget) { if (($object = $widget->getObject()) instanceof WidgetRenderable) { Meta::loadPackage($object->getMediaPackages()); } }); parent::placeWidgetsToLayoutBlocks(); }
/** * @param WidgetCollection $collection */ public function __construct(WidgetCollection $collection) { $this->collection = $collection; $this->collection->placeWidgetsToLayoutBlocks(); }