Add images names to droplist.

@param array $configs

@see https://codex.wordpress.org/Plugin_API/Filter_Reference/image_size_names_choose
4820
public function addImagesDroplist($configs)
    {
        // Add image names
        add_filter('image_size_names_choose', function ($sizes) use ($configs) {
            // New sizes array
            $new_sizes = [];

            // Iterate on sizes like:
            // @key => [@width, @height, @crop, @dropdown],
            foreach ($configs as $key => $props) {
                if (4 !== count($props)) {
                    continue;
                }

                // Extract last var
                $label = array_pop($props);

                // Check label
                if (empty($label)) {
                    continue;
                }

                // Add image sizes
                $new_sizes[$key] = $label;
            }

            return array_merge($sizes, $new_sizes);
        });
    }
737584
public static function loadList(array $plugins)
    {
        foreach ($plugins as $name) {
            if (self::loaded($name)) {
                continue;
            }

            if ($path = self::_findPlugin($name)) {
                self::load($name, self::_getConfigForLoad($path));
            }
        }
    }
53180
public function load(array $configs, ContainerBuilder $container)
    {
        $config = $this->processConfiguration(new Configuration(), $configs);

        $container->setParameter('ekino.wordpress.install_directory', $config['wordpress_directory'] ?: $container->getParameter('kernel.root_dir').'/../../');
        $this->loadWordpressGlobals($container, $config['globals']);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('manager.xml');
        $loader->load('services.xml');
        $loader->load('hooks.xml');

        $container->setParameter('ekino.wordpress.repositories', $config['services']);
        $this->loadEntities($container, $config['services']);
        $this->loadManagers($container, $config['services']);

        if (isset($config['table_prefix'])) {
            $this->loadTablePrefix($container, $config['table_prefix']);
        }

        if (isset($config['entity_manager'])) {
            $this->loadEntityManager($container, $config['entity_manager']);
        }

        if ($config['load_twig_extension']) {
            $loader->load('twig.xml');
        }

        if ($config['i18n_cookie_name']) {
            $container->setParameter('ekino.wordpress.i18n_cookie_name', $config['i18n_cookie_name']);
            $loader->load('i18n.xml');
        }

        if ($config['enable_wordpress_listener']) {
            $loader->load('listener.xml');
        }

        $container->setParameter('ekino.wordpress.cookie_hash', $config['cookie_hash']);
        $container->setParameter('ekino.wordpress.firewall_name', $config['security']['firewall_name']);
        $container->setParameter('ekino.wordpress.login_url', $config['security']['login_url']);
        $container->setParameter($this->getAlias().'.backend_type_orm', true);
    }
898347
private function prepareCsrfInstance(array $configs = [])
    {
        $configs = Config::get('security.csrf');

        $field = $configs['field_name'];
        $this->singleton(
            'security.csrf',
            function () use ($field) {
                return (new CsrfToken())->setFormFieldName($field);
            }
        );

    }
970796
public function addTarget($target, array $config)
    {
        $ext = $this->getExt($target);
        $config += [
            'files' => [],
            'filters' => [],
            'theme' => false,
            'extend' => false,
            'require' => [],
        ];
        if (!empty($config['paths'])) {
            $config['paths'] = array_map(array($this, '_replacePathConstants'), (array)$config['paths']);
        }
        $this->_targets[$target] = $config;
    }
1331181
public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.xml');

        $config = $this->processConfiguration($this->getConfiguration($configs, $container), $configs);

        $container->setParameter('windows_azure_distribution.config.deployment', $config['deployment']);
        $container->setParameter('windows_azure_distribution.streams', $config['streams']);

        $this->loadSession($config, $container);
        $this->loadAsset($config['assets'], $container);
        $this->loadSharding($config, $container);
        $this->loadServices($config, $container);
        $this->loadKeyValueStore($config, $container, $loader);
    }
538805
public function addNamespaces(array $namespaces): void
    {
        //loop for add single namespace
        foreach ($namespaces as $namespace) {

            // normalize namespace prefix
            $prefix = \trim($namespace[0], '\\');

            // normalize the base directory with a trailing separator
            $baseDir = \rtrim($namespace[1], DIRECTORY_SEPARATOR).'/';

            //add namespace
            $this->prefixes[$prefix] = $baseDir;
        }
    }
878845
protected function _setup($config) {
        if (!empty($config['filename_column'])) {
            $this->_filename_column = $config['filename_column'];
        }

        if (isset($config['synchronouslyScaledTemplates'])) {
            $this->_synchronouslyScaledTemplates = $config['synchronouslyScaledTemplates'];
        }
    }
163817
public function addOptions(array $options)
    {
        $this->options = array_merge($this->options, $options);

        $this->getDefinitionLoader()->setOptions($options);
    }
323981
protected function mergeConfigs(array $configs)
    {
        $mergedConfig = array();
        
        foreach($configs as $config)
        {
            $mergedConfig = array_merge_recursive($mergedConfig, $config);
        }
        
        return  array($mergedConfig);
    }
1017829
public static function setNames(array $names)
    {
        foreach($names as $key => $args)
        {
            static::$channels[$key] = new \Swoole\Coroutine\Channel(...$args);
        }
    }
679715
public function parseConfig(array $configs)
    {
        foreach ($configs as &$config) {
            $config['states'] = $this->parseStates($config['states']);

            if (isset($config['callbacks'])) {
                $config['callbacks'] = $this->parseCallbacks($config['callbacks']);
            }
        }

        return $configs;
    }
340474
public function override(array $configs)
    {
        foreach($configs as $key => $value){
            $this->config[$key] = $value;
        }

        $this->flashConfig();

        return $this;
    }
1186629
public function build($configs)
    {
        foreach ($configs as $config) {

            $this->config = $config;

            $this->initVars();
            $this->loadColumns();

            $this->buildDataClasses();
            $this->buildMapperClasses();
            $this->generateClasses();
        }

        return $this;
    }
677913
private function isValidConfigs(array $configs): void
    {
        $allowedConfigKeys = $this->getAllowedConfigKeys();
        if (!empty($configs)) {
            foreach ($configs as $key => $value) {
                if (!\in_array($key, $allowedConfigKeys, true)) {
                    throw new InvalidKeyException(sprintf(
                        '%s is not a valid key. configs must only contain "%s".',
                        $key,
                        implode(', ', $allowedConfigKeys)
                    ));
                }

                $this->isBool($key, $value);
                $this->isString($key, $value);
                $this->isValidNBest($key, $value);
            }
        }
    }
567828
public function addDummyImage(array $config)
    {
        $keys = ['id', 'file_id', 'filter_id', 'resolution_width', 'resolution_height'];
        $item = array_flip($keys);
        $data = array_merge($item, $config);
        $this->_images[$data['id']] = $data;
    }
1337007
public function load(array $configs, ContainerBuilder $container): void
    {
        $configuration = new Configuration($this->getAlias());
        $this->processConfiguration($configuration, $configs);

        foreach (Iter::makeOneDimension($configs[0], self::ALIAS) as $key => $value) {
            $container->setParameter($key, $value);
        }
    }