Customizable input name

@param  string $name
@param  array $config

@return string
488632
public function getId($name, $config)
    {
        $inputId = str_replace('[]', '', ucfirst($name));

        if (isset($config['id'])) {
            $inputId = $config['id'];
        }

        return $inputId;
    }
608175
public function formfield_text($config = array())
    {
        $config = new AnConfig($config);

        $config->append(array(
            'class' => 'input-block-level',
            'maxlength' => 200,
            'name' => '',
            'id' => '',
            'label' => '',
            'placeholder' => '',
            'description' => '',
            'disabled' => false,
            'type' => 'text',
            'pattern' => '',
            'required' => true,
        ));

        return $this->_render('formfield_text', $config);
    }
333650
protected static function _search($config, $options, $name = null) {
		$defaults = [
			'path' => null,
			'suffix' => null,
			'namespaces' => false,
			'recursive' => false,
			'preFilter' => '/[A-Z][A-Za-z0-9]+\./',
			'filter' => false,
			'exclude' => false,
			'format' => function ($file, $config) {
				$trim = [strlen($config['path']) + 1, strlen($config['suffix'])];
				$file = substr($file, $trim[0], -$trim[1]);
				return $config['prefix'] . str_replace('/', '\\', $file);
			}
		];
		$options += $defaults;
		$path = $options['path'];
		$suffix = $options['namespaces'] ? '' : $config['suffix'];
		$suffix = ($options['suffix'] === null) ? $suffix : $options['suffix'];


		$dFlags = GLOB_ONLYDIR;
		$zFlags = 0;
		if (strpos($path, '{') !== false) {
			$message  = "Search path `{$path}` relies on brace globbing. ";
			$message .= 'Support for brace globbing in search paths has been deprecated.';
			trigger_error($message, E_USER_DEPRECATED);

			$dFlags |= GLOB_BRACE;
			$zFlags |= GLOB_BRACE;
		}
		$libs = (array) glob($path . $suffix, $options['namespaces'] ? $dFlags : $zFlags);

		if ($options['recursive']) {
			list($current, $match) = explode('/*', $path, 2);
			$queue = array_diff((array) glob($current . '/*', $dFlags), $libs);
			$match = str_replace('##', '.+', preg_quote(str_replace('*', '##', $match), '/'));
			$match = '/' . $match . preg_quote($suffix, '/') . '$/';

			while ($queue) {
				if (!is_dir($dir = array_pop($queue))) {
					continue;
				}
				$libs = array_merge($libs, (array) glob("{$dir}/*{$suffix}"));
				$queue = array_merge($queue, array_diff((array) glob("{$dir}/*", $dFlags), $libs));
			}
			$libs = preg_grep($match, $libs);
		}
		if ($suffix) {
			$libs = $options['preFilter'] ? preg_grep($options['preFilter'], $libs) : $libs;
		}
		return static::_filter($libs, (array) $config, $options + compact('name'));
	}
1046131
protected function buildFilter($name, $config)
    {
        $className = $name;
        if (!class_exists($className)) {
            $className = 'MiniAsset\Filter\\' . $name;
        }
        if (!class_exists($className)) {
            throw new RuntimeException(sprintf('Cannot load filter "%s".', $name));
        }
        $filter = new $className();
        $filter->settings($config);
        return $filter;
    }
640078
public static function registerConfig($name, array $config) {
		if( empty($config['path']) ) {
			throw new \Exception('Missing a valid "path" in configuration of route "'.$name.'"');
		}
		
// 		$parameters = array();
// 		if( isset($config['parameters']) && is_array($config['parameters']) ) {
// 			foreach( $config['parameters'] as $paramName => $paramConfig ) {
// 				$parameters[] = CLIArgument::make($paramName, $paramConfig);
// 			}
// 		}
		$options = $config;
		unset($options['path'], $options['controller'], $options['parameters']);
		static::register($name, $config['path'], $config['controller'], array(), $options);
	}
95191
public function appendExtension($name, array $config = [])
    {
        $merged = array_merge_recursive(
            $this->getExtension($name),
            $config
        );

        $this->addExtension($name, $merged);
    }
714739
public function parseName($name)
    {
        if(null !== $this->config->prefix)
        {
            return str_replace('@', $this->config->prefix, $name);
        }
        else
        {
            return $name;
        }
    }
668585
protected function addButton($builder, $name, $config)
    {
        $options = (isset($config['options']))? $config['options'] : array();
        $builder->add($name, $config['type'], $options);
    }
562804
public function connect(array $config, string $name = 'main'): Connection
    {
        if (isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [$name] is already configured.");
        }

        $this->connections[$name] = new Connection($config);

        return $this->connections[$name];
    }
1041388
public function prependExtensionConfig($name, array $config)
    {
        if (!isset($this->extensionConfigs[$name])) {
            $this->extensionConfigs[$name] = [];
        }

        array_unshift($this->extensionConfigs[$name], $config);
    }
68893
public static function forge($name = 'default', array $config = array())
	{
		if ($exists = static::instance($name))
		{
			\Error::notice('Fieldset with this name exists already, cannot be overwritten.');
			return $exists;
		}

		static::$_instances[$name] = new static($name, $config);

		if ($name == 'default')
		{
			static::$_instance = static::$_instances[$name];
		}

		return static::$_instances[$name];
	}
1020412
private function getFormConfigKey($name, array $control)
    {
        if ($this->isFrontend($control['component'])) {
            $control['component'] = 'content';
            $control['method']    = 'index';
        }
        return implode(self::separator, [$control['component'], $control['action'], $control['method'], $name]);
    }
672162
public function formfield_custom($config)
    {
        $config = new AnConfig($config);

        $config->append(array(
          'class' => 'input-block-level'
        ));

        return $this->_render('formfield_custom', $config);
    }
882478
private static function getClass($name, array $config)
    {
        if (!empty($config['custom_adapters_namespace'])) {
            $namespaces = (array) $config['custom_adapters_namespace'];

            foreach ($namespaces as $namespace) {
                $class = $namespace.$name;

                if (class_exists($class)) {
                    return $class;
                }
            }
        }

        return 'Embed\\Adapters\\'.$name;
    }
123110
protected function callCustomCreator($name, array $config)
    {
        $driver = $config['driver'];

        $callback = $this->customCreators[$driver];

        return call_user_func($callback, $this->app, $name, $config);
    }
923280
public function addCommand($name, $config = array())
    {
        $command = parent::addCommand($name, $config);

        $controller = $this->getController();

        if($controller->isEditable() && KStringInflector::isSingular($controller->getView()->getName())) {
            $command->disabled = true;
        }

        return $this;
    }
1072141
public function getFirstByNameType( $name, $type, $config = [] ) {

		$modelClass = static::$modelClass;

		return $modelClass::findFirstByNameType( $name, $type, $config );
	}