List registered configuration types

@return void
351077
public function listTypesCommand()
    {
        $this->outputLine('The following configuration types are registered:');
        $this->outputLine();

        foreach ($this->configurationManager->getAvailableConfigurationTypes() as $type) {
            $this->outputFormatted('- %s', [$type]);
        }
    }
54270
protected function parseContenttypes()
    {
        $contentTypes = $this->config->get('contenttypes');

        foreach ($contentTypes as $type => $values) {
            $this->getSearchableColumns($type);
            if (isset($values['taxonomy'])) {
                $this->parseTaxonomies($type, $values['taxonomy']);
            }
        }
    }
184614
protected function registerRequestTypes()
    {
        foreach ($this->requests as $key => $requestType) {
            $contract = is_string($key) ? $key : $this->convention->contractForRequest($requestType);
            $this->concord->registerRequest($contract, $requestType);
        }
    }
672832
public function registerCustomPostTypes()
    {
        if (function_exists('get_field')) {
            $type_definitions = get_field('avabile_dynamic_post_types', 'option');

            if (is_array($type_definitions) && !empty($type_definitions)) {
                foreach ($type_definitions as $type_definition_key => $type_definition) {
                    $labels = array(
                        'name'               => $type_definition['post_type_name'],
                        'singular_name'      => $type_definition['post_type_name'],
                        'menu_name'          => $type_definition['post_type_name'],
                        'name_admin_bar'     => $type_definition['post_type_name'],
                        'add_new'            => __('Add new', 'municipio'),
                        'add_new_item'       => sprintf(__('Add new %s', 'municipio'), $type_definition['post_type_name']),
                        'new_item'           => sprintf(__('New %s', 'municipio'), $type_definition['post_type_name']),
                        'edit_item'          => sprintf(__('Edit %s', 'municipio'), $type_definition['post_type_name']),
                        'view_item'          => sprintf(__('View %s', 'municipio'), $type_definition['post_type_name']),
                        'all_items'          => sprintf(__('All %s', 'municipio'), $type_definition['post_type_name']),
                        'search_items'       => sprintf(__('Search %s', 'municipio'), $type_definition['post_type_name']),
                        'parent_item_colon'  => sprintf(__('Parent %s', 'municipio'), $type_definition['post_type_name']),
                        'not_found'          => sprintf(__('No %s found', 'municipio'), $type_definition['post_type_name']),
                        'not_found_in_trash' => sprintf(__('No %s found in trash', 'municipio'), $type_definition['post_type_name'])
                    );

                    $supports = array('title', 'editor');
                    if (!empty($type_definition['supports'])) {
                        $supports = array_merge($type_definition['supports'], $supports);
                    }

                    $args = array(
                        'labels'             => $labels,
                        'description'        => __('Auto generated cpt from user iterface.', 'municipio'),
                        'public'             => $type_definition['public'],
                        'show_in_menu'       => $type_definition['show_in_nav_menus'],
                        'rewrite'            => array(
                                                    'with_front' => isset($type_definition['with_front']) ? $type_definition['with_front'] : true,
                                                    'slug' => sanitize_title($type_definition['slug'])
                                                ),
                        'capability_type'    => 'post',
                        'hierarchical'       => $type_definition['hierarchical'],
                        'supports'           => $supports,
                        'menu_position'      => (int) $type_definition['menu_position'],
                        'has_archive'        => true,
                        'show_in_rest'       => true,
                        'rest_base'          => sanitize_title($type_definition['slug'])
                    );

                    //Get custom menu icon
                    if (isset($type_definition['menu_icon']) && isset($type_definition['menu_icon']['id']) && is_numeric($type_definition['menu_icon']['id'])) {
                        $image_filepath = get_attached_file($type_definition['menu_icon']['id']);

                        if (file_exists($image_filepath)) {
                            $args['menu_icon'] = 'data:image/svg+xml;base64,'. base64_encode(
                                file_get_contents($image_filepath)
                            );
                        }
                    }

                    register_post_type(sanitize_title(substr($type_definition['post_type_name'], 0, 19)), $args);
                }
            }
        }
    }
984220
protected function packageList()
    {
        $packages = $this->config->all();
        foreach ($packages as $name => $package) {
            $this->output->writeln('<info>'.$name.'</info> | '.$this->parsePackageInfo($package));
        }
    }
1039252
protected function registerConfigBindings()
    {
        $loader = new FileLoader(new Filesystem(), $this->resourcePath('config'));

        $this->singleton('config', function () use ($loader) {
            return new Repository($loader, $this->environment());
        });
    }
1128426
protected function _registerPostTypesFromConfigure()
    {
        $configure = Configure::read('CA.Models');

        foreach ($configure as $name => $model) {
            $this->register($model);
        }
    }
1195242
public function check_config()
    {
        $this->load_config();

        if (!$this->configured) {
            return;
        }

        $out = $seen = array();

        // iterate over the current configuration
        foreach (array_keys($this->config) as $prop) {
            if ($replacement = $this->replaced_config[$prop]) {
                $out['replaced'][]  = array('prop' => $prop, 'replacement' => $replacement);
                $seen[$replacement] = true;
            }
            else if (!$seen[$prop] && in_array($prop, $this->obsolete_config)) {
                $out['obsolete'][] = array('prop' => $prop);
                $seen[$prop]       = true;
            }
        }

        // the old default mime_magic reference is obsolete
        if ($this->config['mime_magic'] == '/usr/share/misc/magic') {
            $out['obsolete'][] = array(
                'prop'    => 'mime_magic',
                'explain' => "Set value to null in order to use system default"
            );
        }

        // check config dependencies and contradictions
        if ($this->config['enable_spellcheck'] && $this->config['spellcheck_engine'] == 'pspell') {
            if (!extension_loaded('pspell')) {
                $out['dependencies'][] = array(
                    'prop'    => 'spellcheck_engine',
                    'explain' => "This requires the <tt>pspell</tt> extension which could not be loaded."
                );
            }
            else if (!empty($this->config['spellcheck_languages'])) {
                foreach ($this->config['spellcheck_languages'] as $lang => $descr) {
                    if (!@pspell_new($lang)) {
                        $out['dependencies'][] = array(
                            'prop'    => 'spellcheck_languages',
                            'explain' => "You are missing pspell support for language $lang ($descr)"
                        );
                    }
                }
            }
        }

        if ($this->config['log_driver'] == 'syslog') {
            if (!function_exists('openlog')) {
                $out['dependencies'][] = array(
                    'prop'    => 'log_driver',
                    'explain' => "This requires the <tt>syslog</tt> extension which could not be loaded."
                );
            }

            if (empty($this->config['syslog_id'])) {
                $out['dependencies'][] = array(
                    'prop'    => 'syslog_id',
                    'explain' => "Using <tt>syslog</tt> for logging requires a syslog ID to be configured"
                );
            }
        }

        // check ldap_public sources having global_search enabled
        if (is_array($this->config['ldap_public']) && !is_array($this->config['autocomplete_addressbooks'])) {
            foreach ($this->config['ldap_public'] as $ldap_public) {
                if ($ldap_public['global_search']) {
                    $out['replaced'][] = array(
                        'prop'        => 'ldap_public::global_search',
                        'replacement' => 'autocomplete_addressbooks'
                    );
                    break;
                }
            }
        }

        return $out;
    }
26705
public static function get_available_field_types() {
        $fieldtypes = array();

        $plugins = \core\plugininfo\customfield::get_enabled_plugins();
        foreach ($plugins as $type => $unused) {
            $fieldtypes[$type] = get_string('pluginname', 'customfield_' . $type);
        }
        asort($fieldtypes);

        return $fieldtypes;
    }
845378
public function mf_register_post_types(){
    global $mf_pt_register,$mf_pt_unique;

    $post_types = $this->_get_post_types();
    
    foreach($post_types as $p){
      $p = unserialize($p['arguments']);

      $name = $p['core']['type'];
      $option = $p['option'];

      $option['show_in_menu'] = ($option['show_in_menu']) ? true : false;
      $option['query_var'] = ($option['query_var']) ? true : false;
      $option['exclude_from_search'] = ($option['exclude_from_search']) ? true : false;
      $option['labels'] = $p['label'];
      $option['with_front'] = (isset($option['with_front'])) ? $option['with_front'] : true;


      if( isset($p['support']) ){
        foreach($p['support'] as $k => $v){
          $option['supports'][] = $k;
        }
      }

      //always add support for the editor
      $option['supports'][] = 'editor';
      $option['supports'] = array_unique($option['supports']);

      if( isset($p['taxonomy']) ){
        foreach($p['taxonomy'] as $k => $v){
          //register_taxonomy_for_object_type($k, $name);
          $option['taxonomies'][] = $k;
        }
      }
			if(isset($option['has_archive']) && $option['has_archive'] && isset($option['has_archive_slug']) && $option['has_archive_slug'])	
				$option['has_archive'] = $option['has_archive_slug'];
			
			
      if($option['rewrite'] && $option['rewrite_slug'])
        $option['rewrite'] = array( 'slug' => $option['rewrite_slug'],'with_front' => $option['with_front']);

      unset($option['rewrite_slug']);
      unset($option['with_front']);
      array_push($mf_pt_register,$name);

      if($option['menu_position']){
        $option['menu_position'] = (int)$option['menu_position'];
      }

      //check Capability type
      trim($option['capability_type']);
      if(empty($option['capability_type'])){
        $option['capability_type'] = 'post';
      }elseif( !in_array($option['capability_type'],array('post','page')) ){
        $option['capabilities'] = $this->_get_cap($option['capability_type']);
      }
      
      //classic pin image for the menu
      if ( isset($option['menu_icon']) && empty($option['menu_icon']) )  {
        unset($option['menu_icon']);
      }
       
      


      //description
      $option['description'] = $p['core']['description'];
      register_post_type($name,$option);

      //add unique post type
      if (isset($p['core']['quantity']) && $p['core']['quantity'] == 1) {
        array_push($mf_pt_unique, "edit.php?post_type=".$name);
      }
     
     
    }
  
  }
533515
public function findGeneralConfiguration(): array
    {
        /** @var array[] $configurationSets */
        $configurationSets = [[]];

        $modules = $this->packageRepository->findModules();
        foreach ($modules as $module) {
            $extra = $module->getExtra();
            $this->validateGeneralConfigurationSectionInExtra($extra);
            if (!isset($extra['phplist/core']['configuration'])) {
                continue;
            }

            $configurationSets[] = $extra['phplist/core']['configuration'];
        }

        return /** @scrutinizer ignore-call */ array_replace_recursive(...$configurationSets);
    }
1024567
private static function initializeConfigurations()
    {
        if (!is_readable(self::CONFIGURATION_PATH)) {
            throw new \RuntimeException("Cannot parse configurations file (config.ini)");
        }
        self::$configurationFile = new ConfigurationFile(self::CONFIGURATION_PATH);
    }
769853
protected static function _loadConfig()
    {
        foreach (static::$_config as $name => $properties) {
            if (isset($properties['engine'])) {
                $properties['className'] = $properties['engine'];
            }
            if (!static::$_registry->has($name)) {
                static::$_registry->load($name, $properties);
            }
        }
    }
895917
public function getPluginForConfigType($config_type) {
    $plugins = [];

    foreach ($this->getDefinitions() as $plugin_id => $plugin) {
      try {
        $instance = $this->createInstance($plugin_id);
      }
      catch (PluginException $exception) {
        continue;
      }

      if ($instance->getConfigType() !== $config_type) {
        continue;
      }
      $plugins[] = [
        'plugin' => $instance,
        'weight' => $instance->weight(),
      ];
    }

    if (empty($plugins)) {
      return NULL;
    }
    usort($plugins, ['\Drupal\Component\Utility\SortArray', 'sortByWeightElement']);
    $data = reset($plugins);

    return $data['plugin'];
  }
1138521
protected function getCustomMappingTypes()
    {
        $mappingTypes = (array) $this->getOption('custom_mapping_types');

        return array_filter(
            $mappingTypes,
            function ($name) {
                return is_string($name);
            },
            ARRAY_FILTER_USE_KEY
        );
    }
455895
protected function getConfigs()
    {
    	$session = $this->container->get('session');
    	if (!$configs = $session->get($this->getRequest()->get('thrace_media_id', false))){
            $configs = [
                'max_upload_size' => '200000000',
                'extensions' => 'application/*'
            ];
    	}
    	
    	return $configs;
    }
530636
public function listPrefixes()
    {
        $prefixes = Cache::configured();
        foreach ($prefixes as $prefix) {
            $this->out($prefix);
        }
    }