/** * @param WidgetManagerInterface $widgetManager * @param string $name * @param string $description */ public function __construct(WidgetManagerInterface $widgetManager, $name, $description = '') { $this->widgetManager = $widgetManager; $this->type = $widgetManager->getTypeByClassName(get_called_class()); $this->name = $name; $this->description = $description; $this->relatedWidgets = new Collection(); if (method_exists($this, 'boot')) { app()->call([$this, 'boot']); } }