Detect all ui components.

@return \Illuminate\Support\Collection|array
192966
public function detect()
    {
        
        $components = $this->finder()->detect();
        if (!$this->isValidRoute()) {
            return $components;
        }
        $this->app->make('events')->fire('antares.ui-components: detecting');
        $this->app->make('events')->fire(new ComponentsDetecting());
        
        
        $service = app(Service::class);
        foreach ($components as $component) {
            $result = $service->findOne($component, uri());
            if (!empty($result)) {
                continue;
            }
            $this->app->make('ui-components')->save(array_get($component, 'name'), $component);
        }
        
        return $components;
    }
720939
public function findAll()
    {
        $appNodes = array();
        foreach ($this->getSystemConfiguration()->getApps() as $appNode) {
            $appNodes[$appNode->getPrimaryKey()] = $appNode;
        }
        return $appNodes;
    }
11534
public function getComponents()
    {
        $result = [];

        foreach ($this->children as $childGroup) {
            foreach ($childGroup as $child) {
                if ($child instanceof self) {
                    $result[] = $child;
                }
            }
        }

        return $result;
    }
795098
public function getWidgetMapsForViewAndTemplates()
    {
        $widgetMaps = [];

        foreach ($this->getWidgetMaps() as $_widgetMap) {
            $widgetMaps[] = $_widgetMap;
        }

        if ($template = $this->getTemplate()) {
            $templateWidgetMaps = $template->getWidgetMapsForViewAndTemplates();
            $widgetMaps = array_merge($widgetMaps, $templateWidgetMaps);
        }

        return $widgetMaps;
    }
32359
protected function getAll()
    {
        $widgets = getConfig('Widgets.general', []);

        if ($this->getView()->getRequest()->isUrl(['_name' => 'homepage']) && getConfig('Widgets.homepage')) {
            $widgets = getConfig('Widgets.homepage');
        }

        return $widgets ? collection($widgets)->map(function ($args, $name) {
            if (is_string($name) && is_array($args)) {
                return [$name => $args];
            } elseif (is_string($args)) {
                return [$args => []];
            }

            list($name, $args) = [array_key_first($args), array_value_first($args)];

            return is_int($name) && is_string($args) ? [$args => []] : [$name => $args];
        })->toList() : [];
    }
183033
protected function elements()
    {
        $window = UrlWindow::make($this);

        return array_filter([
            $window['first'],
            is_array($window['slider']) ? '...' : null,
            $window['slider'],
            is_array($window['last']) ? '...' : null,
            $window['last'],
        ]);
    }
704271
public function coreComponents()
    {
        return ArrayHelper::merge(parent::coreComponents(), [
            'db' => [
                'class' => 'yii\db\Connection',
                'dsn' => getenv('DB_DSN'),
                'username' => getenv('DB_USER'),
                'password' => getenv('DB_PASSWORD'),
                'charset' => 'utf8',
                'tablePrefix' => getenv('DB_TABLE_PREFIX'),
                'enableSchemaCache' => YII_ENV_PROD ? true : false,
            ],
        ]);
    }
243879
public function detect()
    {
        $themes = new Collection();
        $file   = $this->app->make('files');
        $path   = rtrim($this->app->make('path.public'), '/') . '/themes/';

        $folders = $file->directories($path);

        foreach ($folders as $folder) {
            $name          = $this->parseThemeNameFromPath($folder);
            $themes[$name] = new Manifest($file, rtrim($folder, '/') . '/');
        }

        return $themes;
    }
1270168
public function getAll(): array
    {
        return \array_merge(
            $this->interfaces,
            $this->traits,
            $this->abstractClasses,
            $this->classes
        );
    }
1328410
public function renderComponent()
    {
        $name = array_pop($this->componentStack);

        return $this->render($name, $this->componentData($name));
    }
74897
private function getComponents()
    {
        // Order of components being registered is extremely important!
        return array(
            new Component\Request(),
            new Component\Paginator(),
            new Component\Db(),
            new Component\MapperFactory(),
            new Component\SessionBag(),
            new Component\AuthManager(),
            new Component\AuthAttemptLimit(),
            new Component\ParamBag(),
            new Component\AppConfig(),
            new Component\Config(),
            new Component\ModuleManager(),
            new Component\Translator(),
            new Component\Response(),
            new Component\FlashBag(),
            new Component\FormAttribute(),
            new Component\ValidatorFactory(),
            new Component\WidgetFactory(),
            new Component\UrlBuilder(),
            new Component\View(),
            new Component\Profiler(),
            new Component\Cache(),
            new Component\CsrfProtector(),
            new Component\Captcha(),
            // Dispatcher always must be very last component to be registered
            new Component\Dispatcher()
        );
    }
354072
protected function getAllMenus()
    {
        if (!empty(self::$menus)) {
            return self::$menus;
        }

        $components = PluginManager::getInstance()->findComponents('Menu', 'Piwik\\Plugin\\Menu');

        self::$menus = array();
        foreach ($components as $component) {
            self::$menus[] = StaticContainer::get($component);
        }

        return self::$menus;
    }
504893
public static function getCustomInteractions() {
        $taoQtiItem = common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiItem');
        $map = $taoQtiItem->getConfig(self::CONFIG_ID);
        return is_array($map) ?  $map : array();
    }
1085412
public function getComponents()
    {
        $components = [
            'Base'                          => 'GetOlympus\Zeus\Base\Controller\Base',
            'BaseWidget'                    => 'GetOlympus\Zeus\Base\Controller\BaseWidget',
            'Helpers'                       => 'GetOlympus\Zeus\Helpers\Controller\Helpers',

            'AdminPage'                     => 'GetOlympus\Zeus\AdminPage\Controller\AdminPage',
            'Ajax'                          => 'GetOlympus\Zeus\Ajax\Controller\Ajax',
            'Configuration'                 => 'GetOlympus\Zeus\Configuration\Controller\Configuration',
            'Cron'                          => 'GetOlympus\Zeus\Cron\Controller\Cron',
            'Error'                         => 'GetOlympus\Zeus\Error\Controller\Error',
            'Field'                         => 'GetOlympus\Zeus\Field\Controller\Field',
            'Hook'                          => 'GetOlympus\Zeus\Hook\Controller\Hook',
            'Metabox'                       => 'GetOlympus\Zeus\Metabox\Controller\Metabox',
            'Option'                        => 'GetOlympus\Zeus\Option\Controller\Option',
            'Posttype'                      => 'GetOlympus\Zeus\Posttype\Controller\Posttype',
            'PosttypeHook'                  => 'GetOlympus\Zeus\Posttype\Controller\PosttypeHook',
            'Render'                        => 'GetOlympus\Zeus\Render\Controller\Render',
            'Request'                       => 'GetOlympus\Zeus\Request\Controller\Request',
            'Template'                      => 'GetOlympus\Zeus\Template\Controller\Template',
            'Term'                          => 'GetOlympus\Zeus\Term\Controller\Term',
            'TermHook'                      => 'GetOlympus\Zeus\Term\Controller\TermHook',
            'Translate'                     => 'GetOlympus\Zeus\Translate\Controller\Translate',
            'WalkerSingle'                  => 'GetOlympus\Zeus\WalkerSingle\Controller\WalkerSingle',
            'Widget'                        => 'GetOlympus\Zeus\Widget\Controller\Widget',
        ];

        // Iterate on externals
        foreach ($this->externals as $shortname => $classname) {
            $components[$shortname] = $classname;
        }

        return $components;
    }
873884
public function getCheckedComponents()
    {
        $returnValue = array();

        
    	// Sort the checked components to make them ordered in the same
        // way the related components where added.
        $components = $this->getComponents();
        $checkedComponents = array();
        foreach ($components as $c){
        	foreach ($this->checkedComponents as $cC){
        		if ($cC === $c){
        			array_push($checkedComponents, $cC);
        		}
        	}
        }
        
        
        $returnValue = $checkedComponents;
        

        return (array) $returnValue;
    }
844148
public function getMainComponents() {
    $base_path = $this->getBaseComponentPath();

    $filter = function (Extension $module) use ($base_path) {
      return dirname($module->getPath()) == $base_path;
    };

    return array_filter($this->getAll(), $filter);
  }
655688
public function all()
    {
        if ($this->isEmpty()) {
            return [];
        }

        $arResult = [];
        foreach ($this->arElementIDList as $iElementID) {
            $obElementItem = $this->makeItem($iElementID, null);
            if ($obElementItem->isEmpty()) {
                continue;
            }

            $arResult[$iElementID] = $obElementItem;
        }

        return $arResult;
    }