@todo define what I do

@param array $excludedWidgetInstances

@return \Claroline\CoreBundle\Entity\Widget\WidgetInstance[]
497661
public function getAdminDesktopWidgetInstance(array $excludedWidgetInstances)
    {
        if (count($excludedWidgetInstances) === 0) {
            return $this->widgetInstanceRepo->findBy(
                array(
                    'isAdmin' => true,
                    'isDesktop' => true
                )
            );
        }

        return $this->widgetInstanceRepo
            ->findAdminDesktopWidgetInstance($excludedWidgetInstances);
    }
87772
public function getOptions(array $excludes = null): array
    {
        $options = parent::getOptions($excludes);

        /*
         * Let's add the choices in a readable format as
         * well as the layout property.
         */
        $choices = $this->getOption('choices', []);

        if ($choices instanceof ChoiceListInterface) {
            $choices = $choices->format()->get();
        }

        return array_merge($options, [
            'choices' => $choices,
            'layout' => $this->getLayout()
        ]);
    }
922117
public function createWidgetRegisterSession(array $allowedTypes = null, $recipient = null, $backupCodeIdentifier = null, $totpIdentifier = null, $issuer = null)
    {
        $widgetRegisterSession = $this->factory->createWidgetRegisterSession($allowedTypes, $recipient, $backupCodeIdentifier, $totpIdentifier, $issuer);

        return $widgetRegisterSession;
    }
41870
protected function removeOverwritedWidgetMaps($widgetMaps)
    {
        $slots = [];
        /** @var WidgetMap $widgetMapItem */
        foreach ($widgetMaps as $widgetMapItem) {
            $id = $widgetMapItem->getId();
            // If the widgetmap replace one (has a "replaced"), use the replaced id as key
            if ($widgetMapItem->getReplaced()) {
                $id = $widgetMapItem->getReplaced()->getId();
            }
            // If "id" is not present in slot array or
            if (empty($slots[$widgetMapItem->getSlot()][$id])
                // or if the id exists AND the inserted widgetmap is overwrite|delete, then erase the initial widget by it
                || !empty($slots[$widgetMapItem->getSlot()][$id])
                && $widgetMapItem->getAction() !== WidgetMap::ACTION_CREATE) {
                $slots[$widgetMapItem->getSlot()][$id] = $widgetMapItem;
            }
        }

        return $slots;
    }
931559
public function getSearchQuery($excludedCategories = [])
    {
        $searchQuery = parent::getSearchQuery();

        if ($this->getAttribute() === 'category_ids') {
            $searchQuery = $this->getCategorySearchQuery($excludedCategories);
        }

        return $searchQuery;
    }
1015099
public function addExcludedForEasyFilters(array $excludedForEasyFilters): RequestQueryModifier
    {
        $this->excludedForEasyFilters = array_merge($this->excludedForEasyFilters, $excludedForEasyFilters);

        return $this;
    }
1026048
public function getExcludedClasses()
    {
        $excludedClasses = [];

        foreach ($this->classes as $excludedClass) {
            $excludedClasses[] = $excludedClass->getName();
        }

        return $excludedClasses;
    }
221957
public function exceptValues($excluded = [])
    {
        Arguments::define(
            Boa::arrOf(
                Boa::either(
                    Boa::string(),
                    Boa::integer()
                )
            )
        )->check($excluded);

        return $this->filter(
            function ($value) use ($excluded) {
                return !in_array($value, $excluded);
            }
        );
    }
1095819
protected function excludeUnSortable($indexedColumns)
    {
        if (property_exists($this, 'unSortable') && !empty($this->unSortable)) {
            $indexedColumns = array_diff($indexedColumns, $this->unSortable);
        }

        return $indexedColumns;
    }
443536
protected function excludes($excludes)
    {
        $excludes = \is_array($excludes) ? $excludes : \func_get_args();

        $this->excludes = $excludes;

        return $this;
    }
461848
protected function hydrateWidgets($widgets)
    {
        $isWidgetsStringBased = static::isWidgetsStringBased($widgets);
        $isWidgetsIntBased = static::isWidgetsIntBased($widgets);
        $field = $isWidgetsStringBased ? 'id' : 'id';
        $className = static::getWidgetClassName();

        return $isWidgetsStringBased || $isWidgetsIntBased
            ? $className::query()->whereIn($field, (array) $widgets)->get() : collect($widgets);
    }
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']];
        }
    }
291214
public function getMixableMethods($exclude = array())
    {
        $methods = parent::getMixableMethods($exclude);

        if($this->isSupported())
        {
            foreach($this->__actions as $action) {
                $methods[$action] = $this;
            }
        }

        return $methods;
    }
1012752
public function getSlotManagers($removeIncludedSlots = false)
    {
        return ( ! $removeIncludedSlots) ? $this->slotManagers : array_intersect_key($this->slotManagers, array_flip(array_keys($this->themeSlots->getSlots())));
    }
149065
protected function reorderWidgets($widgets)
    {
        $formatted = [];

        foreach ($widgets as $key => $widget) {
            if (is_array($widget)) {
                $formatted[] = [
                    'name' => array_get($widget, 0),
                    'order' => array_get($widget, 1),
                ];
            } else {
                $formatted[] = [
                    'name' => $widget,
                    'order' => $key,
                ];
            }
        }

        return collect($formatted)->sortBy(function ($widget) {
            return $widget['order'];
        })->all();
    }
1127494
public function getUniqueFormatters(bool $include_excluded_columns = false): ArrayObject
    {
        $unique = new ArrayObject();

        $formatters = $this->getFormatters();
        foreach ($formatters as $column => $formatter) {
            if ($include_excluded_columns || !$this->get($column)->isExcluded()) {
                $hash = spl_object_hash($formatter);
                if (!$unique->offsetExists($hash)) {
                    $tmp = new ArrayObject([
                                                'formatter' => $formatter,
                                                'columns' => new ArrayObject([$column])
                    ]);
                    $unique->offsetSet($hash, $tmp);
                } else {
                    $unique->offsetGet($hash)->offsetGet('columns')->append($column);
                }
            }
        }

        return $unique;
    }
170026
public function setExcludes(array $excludes = []): self
    {
        foreach ($excludes as $exclude) {
            $this->addExclude($exclude);
        }

        return $this;
    }