code: public function getWidgets($checkRole = true)
      {
          // Check Role
          $this->checkRole = $checkRole;
  
          // Dispatch Event
          if (!$this->widgets) {
              $this->eventDispatcher->dispatch(WidgetEvent::WIDGET_START, new WidgetEvent($this));
          }
  
          return $this->widgets;
      }
docs: Get Widgets.
  
  @return array|ItemInterface[]