protected function getNestedConfig($field, $config)
	{
		$field = preg_split('(__([0-9]+)__)', substr($field, 11), -1, PREG_SPLIT_DELIM_CAPTURE);

		if (!isset($config[$field[0]])) {
			return null;
		}

		$fieldConfig =& $config[$field[0]];

		for ($i = 0; isset($field[$i]); $i += 2) {

			if (isset($field[$i + 1])) {
				if (!isset($fieldConfig['fields'])) {
					return null;
				}
				if (!isset($fieldConfig['fields'][$field[$i + 2]])) {
					return null;
				}
				$fieldConfig =& $fieldConfig['fields'][$field[$i + 2]];
			}
			else {
				return $fieldConfig;
			}

		}
	}
protected function getNestedConfig($field, $config)
	{
		$field = preg_split('(__([0-9]+)__)', substr($field, 11), -1, PREG_SPLIT_DELIM_CAPTURE);

		if (!isset($config[$field[0]])) {
			return null;
		}

		$fieldConfig =& $config[$field[0]];

		for ($i = 0; isset($field[$i]); $i += 2) {

			if (isset($field[$i + 1])) {
				if (!isset($fieldConfig['fields'])) {
					return null;
				}
				if (!isset($fieldConfig['fields'][$field[$i + 2]])) {
					return null;
				}
				$fieldConfig =& $fieldConfig['fields'][$field[$i + 2]];
			}
			else {
				return $fieldConfig;
			}

		}
	}
protected function getNestedConfig ( $ field , $ config ) { $ field = preg_split ( '(__([0-9]+)__)' , substr ( $ field , 11 ) , - 1 , PREG_SPLIT_DELIM_CAPTURE ) ; if ( ! isset ( $ config [ $ field [ 0 ] ] ) ) { return null ; } $ fieldConfig = & $ config [ $ field [ 0 ] ] ; for ( $ i = 0 ; isset ( $ field [ $ i ] ) ; $ i += 2 ) { if ( isset ( $ field [ $ i + 1 ] ) ) { if ( ! isset ( $ fieldConfig [ 'fields' ] ) ) { return null ; } if ( ! isset ( $ fieldConfig [ 'fields' ] [ $ field [ $ i + 2 ] ] ) ) { return null ; } $ fieldConfig = & $ fieldConfig [ 'fields' ] [ $ field [ $ i + 2 ] ] ; } else { return $ fieldConfig ; } } }
Get the config from field name

@param  string $field Field name
@return mixed         Configuration of the field
Get the config from field name