Get widgets associated to this businessEntity.

@return null|array
969151
public function getWidgets()
    {
        if ($this->widgets === null || !array_key_exists('value', $this->widgets)) {
            return;
        }

        //return an array, no matter one or many widget defined
        if (count($this->widgets['value']) > 1) {
            return $this->widgets['value'];
        } else {
            return [$this->widgets['value']];
        }
    }
388365
public function getWidgetOptions() {
    $options = new \stdClass;
    foreach (array('width','height','disabled','scrollAnimationDuration','enabledHover','collapsible','animationType','enableScrollAnimation','contentTransitionDuration','toggleMode','selectedItem','position','selectionTracker','scrollable','scrollPosition','scrollStep','autoHeight','showCloseButtons','closeButtonSize','initTabContent','keyboardNavigation','reorder','enableDropAnimation','dropAnimationDuration') as $option) {
      if ($this->$option !== "__spec__undefined") {
        $options->$option = $this->$option;
      }
    }
    return $options;
  }
66840
public function formProperties()
    {
        $sidebars = $this->sidebars;
        if (!is_array($sidebars)) {
            yield null;
        } else {
            foreach ($this->formProperties as $formProperty) {
                if ($formProperty->active() === false) {
                    continue;
                }

                $GLOBALS['widget_template'] = $formProperty->inputType();

                yield $formProperty->propertyIdent() => $formProperty;

                $GLOBALS['widget_template'] = '';
            }
        }
    }
575481
public function getWidgetConfigs()
    {
        $widgetClasses = $this->getAllWidgetClassNames();

        $configs = array();

        /**
         * Triggered to add custom widget configs. To filder widgets have a look at the {@hook Widget.filterWidgets}
         * event.
         *
         * **Example**
         *
         *     public function addWidgetConfigs(&$configs)
         *     {
         *         $config = new WidgetConfig();
         *         $config->setModule('PluginName');
         *         $config->setAction('renderDashboard');
         *         $config->setCategoryId('Dashboard_Dashboard');
         *         $config->setSubcategoryId('dashboardId');
         *         $configs[] = $config;
         *     }
         *
         * @param array &$configs An array containing a list of widget config entries.
         */
        Piwik::postEvent('Widget.addWidgetConfigs', array(&$configs));

        foreach ($widgetClasses as $widgetClass) {
            $configs[] = $this->getWidgetConfigForClassName($widgetClass);
        }

        return $configs;
    }
758398
public function getComponentUpdates()
    {
        $componentsToCheck = array(
            'core' => Version::VERSION
        );

        $manager = \Piwik\Plugin\Manager::getInstance();
        $plugins = $manager->getLoadedPlugins();
        foreach ($plugins as $pluginName => $plugin) {
            if ($manager->isPluginInstalled($pluginName)) {
                $componentsToCheck[$pluginName] = $plugin->getVersion();
            }
        }

        $columnsVersions = $this->columnsUpdater->getAllVersions($this);
        foreach ($columnsVersions as $component => $version) {
            $componentsToCheck[$component] = $version;
        }

        $componentsWithUpdateFile = $this->getComponentsWithUpdateFile($componentsToCheck);

        if (count($componentsWithUpdateFile) == 0) {
            $this->columnsUpdater->onNoUpdateAvailable($columnsVersions);

            return null;
        }

        return $componentsWithUpdateFile;
    }
91125
public function options()
    {
        $params = $this->params;
        return [
            'id'      => isset($params['id']) ? $params['id'] : null,
            'data'    => isset($params['data']) ? $params['data'] : null,
            'widgets' => isset($params['widgets']) ? $params['widgets'] : null,
        ];
    }
278555
public function getData()
    {
        if (!$this->enabled()) {
            return null;
        }

        $this->addDeprecations();
        $this->timers = [];

        return $this->debugbar->getData();
    }
809289
public function all()
    {
        foreach ($this->getAll() as $widget) {
            foreach ($widget as $name => $args) {
                $widgets[] = $this->widget($name, $args);
            }
        }

        return empty($widgets) ? null : trim(implode(PHP_EOL, $widgets));
    }
602435
public function getWidget($alias)
    {
        if (!isset($this->widgets[$alias])) {
            throw new WidgetException(sprintf('View widget with alias "%s" does not exist.', $alias));
        }

        return $this->widgets[$alias];
    }
787730
public function widgetDataForJs()
    {
        return [
            'obj_type'         => $this->objType(),
            'template'         => $this->template(),
            'collection_ident' => $this->collectionIdent(),
            'properties'       => $this->propertiesIdents(),
            'filters'          => $this->filters(),
            'orders'           => $this->orders(),
            'list_actions'     => $this->listActions(),
            'object_actions'   => $this->rawObjectActions(),
            'pagination'       => $this->pagination(),
        ];
    }
162753
public function getData($options)
    {
        if (!empty($options) &&
            array_key_exists('contact', $options) &&
            !empty($options['contact'])
        ) {
            $id = $options['contact'];
            $contact = $this->contactRepository->find($id);

            if (!$contact) {
                throw new WidgetEntityNotFoundException(
                    'Entity ' . $this->contactRepository->getClassName() . ' with id ' . $id . ' not found!',
                    $this->widgetName,
                    $id
                );
            }

            return $this->parseMainContact($contact);
        }

        return null;
    }
178436
public function getWidgetsData(Section $section): array
    {
        switch ($this->config->widgetsStorageType) {
            
            case $this->config::STORAGE_TYPE_DB:
                $storage = new WidgetsDbStorage($this->db);
                break;
                
            case $this->config::STORAGE_TYPE_ARRAY:
                if (!empty($this->config->widgetsStoragePath) 
                && file_exists($this->config->projectPath . $this->config->widgetsStoragePath)) {
                    $storageData = require $this->config->projectPath . $this->config->widgetsStoragePath;
                } else {
                    $storageData = $this->config->widgetsStorageData;
                }
                $storage = new WidgetsArrayStorage($storageData);
                break;
                
            default:
                return [];
                
        }
        
        return $storage->getWidgets($section);
    }
245586
public function widgetFactory()
    {
        if (!isset($this->widgetFactory)) {
            throw new RuntimeException(sprintf(
                'Widget Factory is not defined for "%s"',
                get_class($this)
            ));
        }

        return $this->widgetFactory;
    }
430321
public function filter()
    {
        $widgets = $this->applyFilters();

        return $widgets->sortBy(function (AbstractWidget $w1) {
            return $w1->getOrder();
        });
    }
1361308
protected function defineReportWidgets()
    {
        if ($this->reportsDefined) {
            return;
        }

        $result = [];
        $widgets = $this->getWidgetsFromUserPreferences();

        foreach ($widgets as $alias => $widgetInfo) {
            if ($widget = $this->makeReportWidget($alias, $widgetInfo)) {
                $result[$alias] = $widget;
            }
        }

        uasort($result, function ($a, $b) {
            return $a['sortOrder'] - $b['sortOrder'];
        });

        $this->reportWidgets = $result;

        $this->reportsDefined = true;
    }
97507
public function get_data() {
		$settings = $this->get_settings()[ $this->number ];

		return array_merge(
			[ 'title' => $settings['title'] ],
			Acf::get_widget_field( $this->id )
		);
	}
306727
public function addWidgetBusinessEntity($widgetName, $businessEntity)
    {
        $widgets = $this->cache->get(BusinessEntity::CACHE_WIDGETS, []);
        if (!array_key_exists($widgetName, $widgets)) {
            $widgets[$widgetName] = ['businessEntities' => []];
        }
        $widgets[$widgetName]['businessEntities'][$businessEntity->getId()] = $businessEntity;
        $this->cache->save(BusinessEntity::CACHE_WIDGETS, $widgets);
    }