get all overviews of a config

@param int $configId

@return array
514470
private function getOverviewsOfConfig($configId)
    {
        // get specified config
        $configRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsConfig');
        $config = $configRepository->find($configId);

        if (!$config) {
            throw new \Exception('Unkown config ID');
        }

        // get the overviews
        return $config->getOverviews();
    }
873570
public function getListOfAvailableFiltersForTCA(&$config)
    {

        // get current pid
        if ($config['table'] == 'pages') {
            $currentPid = $config['row']['uid'];
        } else {
            $currentPid = $config['row']['pid'];
        }

        // get the page TSconfig
        $pageTSconfig = BackendUtility::GetPagesTSconfig($currentPid);
        $modTSconfig = $pageTSconfig['tx_kesearch.'];

        // get filters
        $fields = '*';
        $table = 'tx_kesearch_filters';

        $queryBuilder = Db::getQueryBuilder('tx_kesearch_filters');

        // storage pid for filter options
        if (!empty($modTSconfig['filterStorage'])) {
            // storage pid is set in page ts config
            $where = $queryBuilder->expr()->in(
                'pid',
                $modTSconfig['filterStorage']
            );
        } else {
            // no storage pid set in page ts config
            $where = null;
        }

        $res = $queryBuilder
            ->select($fields)
            ->from($table)
            ->where($where)
            ->execute();

        $count = $res->rowCount();
        if ($count) {
            while ($row = $res->fetch()) {
                if (!empty($row['options'])) {
                    $queryBuilder = Db::getQueryBuilder('tx_kesearch_filteroptions');
                    $optionsFields = '*';
                    $optionsTable = 'tx_kesearch_filteroptions';
                    $optionsWhere = $queryBuilder->expr()->in('uid', $row['options']);
                    $options = $queryBuilder
                        ->select($optionsFields)
                        ->from($optionsTable)
                        ->where($optionsWhere)
                        ->execute();

                    while ($optionRow = $options->fetch()) {
                        $config['items'][] = array($row['title'] . ': ' . $optionRow['title'], $optionRow['uid']);
                    }
                }
            }
        }
    }
546247
public static function config($config = []) {
		if (!$config) {
			return ['classes' => static::$_classes, 'unicode' => static::$_unicode];
		}
		if (isset($config['classes'])) {
			static::$_classes = $config['classes'] + static::$_classes;
		}
		if (isset($config['unicode'])) {
			static::$_unicode = $config['unicode'];
		}
	}
405181
protected function _getConfigSet()
    {

        if (empty($_SERVER) && empty($GLOBALS['argv'])) {
            return [];
        }

        // default config for all of them
        $_config_set = array();
        $host_id     = $this->get('host_id');

        /**
         * if there's a specific port remove the port
         *
         * @todo keep in mind that maybe someone needs a port specific behaviour for his app
         */
        if (($pos = strpos((string)$host_id, ':')) !== false) {
            $this->mainNode->addChild(new Node($this->mainNode, 'host_id', ( string )substr($host_id, 0, $pos)));
        }


        // split up the server host_id to an array
        $id_part_list = (array)explode(self::CONFIG_DELIMITER, $host_id);
        if (count($id_part_list) < 3) {
            array_unshift($id_part_list, self::HIERACHY_PLACEHOLDER);
        }

        // add an extra iteration so there is a specific config for a subdomain
        // and a generic one for all subdomains in this toplevel domain
        $count = (int)count($id_part_list) + 1;
        $i     = 0;


        // we don't need to rebuild this standard strings all the time
        $config_del = self::HIERACHY_PLACEHOLDER . ( string )self::CONFIG_DELIMITER;
        $extension  = self::CONFIG_DELIMITER . self::FILE_EXTENSION;

        // the first config is the current host id + .cfg
        $self = (string)$this->config_path . '/' . (string)implode(self::CONFIG_DELIMITER, $id_part_list) . (string)$extension;

        do {
            // shift the first position of the array
            array_shift($id_part_list);

            // if the file exists add it to the "to be parsed list"
            if (file_exists($self) && !in_array($self, $_config_set)) {
                $_config_set [] = (string)$self;
            }

            $file_name = (string)(count($id_part_list) > 0 ? implode(self::CONFIG_DELIMITER, $id_part_list) . (string)$extension : self::FILE_EXTENSION);
            $self      = (string)$this->config_path . '/' . (string)$config_del . $file_name;
            ++$i;
        } while ($i < $count);

        /**
         * Config sort algorithm
         *
         * lambda function for sorting
         *
         * @param $a string
         * @param $b string
         *
         * @return int
         */
        uasort($_config_set, function ($a, $b) {
            // include to the normal namespace

            if (substr_count($a, self::CONFIG_DELIMITER) == substr_count($a, self::CONFIG_DELIMITER)) {
                if (strpos($a, self::HIERACHY_PLACEHOLDER) == true && strpos($b, self::HIERACHY_PLACEHOLDER) == false) {
                    return -1;
                } elseif (strpos($a, self::HIERACHY_PLACEHOLDER) == false && strpos($b, self::HIERACHY_PLACEHOLDER) == true) {
                    return 1;
                }

                return 0;
            }

            return (substr_count($a, self::CONFIG_DELIMITER) > substr_count($b, self::CONFIG_DELIMITER) ? -1 : 1);
        });

        return $_config_set;
    }
1290886
protected function getConfig(): array
    {
        $loader = null;
        if ($this->isCacheEnabled() === true) {
            $loader = $this->getLoader();
            $cached = $loader->load();
            if (empty($cached) === false) {
                return $cached;
            }
        }

        if ($this->isFrameworkEnabled() === true) {
            $this->addFrameworkConfigs();
        }

        $merged = [];
        $merger = $this->getMerger();
        foreach ($this->getConfigs() as $config) {
            $merged = $merger->merge(
                $merged,
                $config->load()
            );
        }

        foreach ($this->getGlobalConfig() as $global) {
            $merged = $merger->merge($merged, $global);
        }

        foreach ($this->getModuleConfig() as $module) {
            $merged = $merger->merge($merged, $module);
        }

        if ($this->isCacheEnabled() === true) {
            if ($loader instanceof CacheLoader) {
                $loader->save($merged);
            }
        }

        return $merged;
    }
482639
public function gettext($msgid)
    {
        if (array_key_exists($msgid, $this->cache_translations)) {
            return $this->cache_translations[$msgid];
        }

        return $msgid;
    }
254342
public function getConfig()
    {
        $config = [];

        $config['general'] = $this->parseGeneral();
        $config['taxonomy'] = $this->parseTaxonomy();
        $config['contenttypes'] = $this->parseContentTypes($config['general']);
        $config['menu'] = $this->parseConfigYaml('menu.yml');
        $config['routing'] = $this->parseConfigYaml('routing.yml');
        $config['permissions'] = $this->parseConfigYaml('permissions.yml');
        $config['extensions'] = $this->parseConfigYaml('extensions.yml');

        return $config;
    }
352418
public function getAll($configFile = 'default'): ?array
    {
        $this->load($configFile);
        if (!Any::isArray($this->data) || !array_key_exists($configFile, $this->data)) {
            return null;
        }

        return $this->data[$configFile];
    }
499444
public function prepareMenuConfig($config): array
    {
        if (is_string($config)) {
            Configure::load($config);
            $config = Configure::read($this->_defaultConfig['configKey']);
        }

        foreach ($config as $mainItem => &$mainData) {
            if (isset($mainData['url']) && !$this->Auth->urlAllowed($mainData['url'])) {
                unset($config[$mainItem]);
                continue;
            }

            if (!empty($mainData['children']) && !$this->_hasAllowedChildren($mainData['children'])) {
                unset($config[$mainItem]);
                continue;
            }

            if (isset($mainData['shouldRender']) && !$mainData['shouldRender']()) {
                unset($config[$mainItem]);
                continue;
            }

            $this->_isItemActive($mainData);

            $visibleChildCount = 0;
            if (!empty($mainData['children'])) {
                $activeChildCount = 0;
                $visibleChildCount = count($mainData['children']);
                foreach ($mainData['children'] as $subItem => &$subData) {
                    if (isset($subData['shouldRender']) && !$subData['shouldRender']()) {
                        unset($mainData['children'][$subItem]);
                        $visibleChildCount--;
                        continue;
                    }

                    $allowed = (!isset($subData['url']) || (isset($subData['url']) && $this->Auth->urlAllowed($subData['url'])));

                    if ($allowed) {
                        if ($this->_isItemActive($subData)) {
                            $activeChildCount++;
                        }
                    } else {
                        $visibleChildCount--;
                    }
                }
                unset($subData);

                if ($activeChildCount > 1) {
                    foreach ($mainData['children'] as $subItem => &$subData) {
                        $subData['active'] = false;
                    }
                    unset($subData);
                }
            }

            // if the main item has no displayable children, remove it.
            if ($visibleChildCount === 0 && isset($config['children']) && count($config['children']) > 0) {
                unset($config[$mainItem]);
            }
        }
        unset($mainData, $subData);

        //set active status
        if (empty($this->_controllerActive)) {
            $this->_controllerActive = $this->_currentUrl['controller'];
        }
        foreach ($config as &$mainData) {
            $mainData['active'] = '';
            if (!empty($this->_actionActive) && !empty($mainData['url'])) {
                if ($mainData['url']['controller'] == $this->_controllerActive && $mainData['url']['action'] == $this->_actionActive) {
                    $mainData['active'] = true;
                }
            } elseif (!empty($mainData['url']) && $mainData['url']['controller'] == $this->_controllerActive) {
                $mainData['active'] = true;
            }
            if (!empty($mainData['children'])) {
                foreach ($mainData['children'] as &$subData) {
                    $subData['active'] = '';
                    if (!empty($this->_actionActive) && !empty($subData['url'])) {
                        if ($subData['url']['controller'] == $this->_controllerActive && $subData['url']['action'] == $this->_actionActive) {
                            $subData['active'] = true;
                            $mainData['active'] = true;
                        }
                    } elseif (!empty($subData['url']) && $subData['url']['controller'] == $this->_controllerActive) {
                        $mainData['active'] = true;
                    }
                }
            }
        }

        return $config;
    }
47616
public function parseConfiguration($config)
    {
        if (is_string($config)) {
            $config = ['url' => $config];
        }

        $url = $config['url'] ?? null;

        $config = Arr::except($config, 'url');

        if (! $url) {
            return $config;
        }

        $parsedUrl = $this->parseUrl($url);

        return array_merge(
            $config,
            $this->getPrimaryOptions($parsedUrl),
            $this->getQueryOptions($parsedUrl)
        );
    }
540532
protected function readConfigFile(string $configFilename): array
  {
    $settings = parse_ini_file($configFilename, true);

    $this->phpStratumMetadataFilename = self::getSetting($settings, true, 'loader', 'metadata');
    $this->sourcePattern              = self::getSetting($settings, true, 'loader', 'sources');
    $this->sqlMode                    = self::getSetting($settings, true, 'loader', 'sql_mode');
    $this->characterSet               = self::getSetting($settings, true, 'loader', 'character_set');
    $this->collate                    = self::getSetting($settings, true, 'loader', 'collate');
    $this->constantClassName          = self::getSetting($settings, false, 'constants', 'class');
    $this->nameMangler                = self::getSetting($settings, false, 'wrapper', 'mangler_class');

    return $settings;
  }
968799
public function getUthandoConfig(): array
    {
        $config             = [];
        $configFilePattern  = join('/', [
            $this->getModulePath(),
            $this->configDirectory,
            $this->filePattern,
        ]);

        foreach (glob($configFilePattern) as $filename) {
            /** @noinspection PhpIncludeInspection */
            $configFile = include $filename;
            $config     = array_merge($config, $configFile);
        }

        return $config;
    }
1346023
protected function loadInstalledComponentsConfig(array $config = []) : array
    {
        $env    = $this->env === self::WEB ? 'web' : 'console';
        $config = FileHelper::loadExtensionsFiles('config/main.php',   $config);
        $config = FileHelper::loadExtensionsFiles("config/{$env}.php", $config);
        return $config;
    }
245396
public function describe(Config $config)
    {
        $data = [];

        foreach ($this->getDescriptors() as $descriptorName => $descriptor) {
            $data = array_replace_recursive($data, $descriptor->describe($config));
        }

        return $data;
    }
116414
public function getAll()
    {
        if ($this->_config !== null) {
            return $this->_config;
        }
        try {
            $this->_config = $this->cached;
        } catch (Exception $exc) {
            Log::warning($exc->getMessage(), null, __METHOD__);
            $this->_config = $this->stored;
        }
        return $this->_config;
    }
440231
protected function getOptionsFromConfig(Config $config)
    {
        $options = [];

        foreach (static::$metaOptions as $option) {
            if (! $config->has($option)) {
                continue;
            }
            $options[static::$metaMap[$option]] = $config->get($option);
        }

        if ($visibility = $config->get('visibility')) {
            // For local reference
            // $options['visibility'] = $visibility;
            // For external reference
            $options['x-oss-object-acl'] = $visibility === AdapterInterface::VISIBILITY_PUBLIC ? OssClient::OSS_ACL_TYPE_PUBLIC_READ : OssClient::OSS_ACL_TYPE_PRIVATE;
        }

        if ($mimetype = $config->get('mimetype')) {
            // For local reference
            // $options['mimetype'] = $mimetype;
            // For external reference
            $options['Content-Type'] = $mimetype;
        }

        return $options;
    }
173726
public function all($group = self::DEFAULT_GROUP) {
        if( $group == self::DEFAULT_GROUP )
            return $this->settings;

        return isset($this->settings[$group]) ? $this->settings[$group] : [];
    }