classes/Kohana/Element.php
public static function factory($config_file = 'bootstrap')
	{
		if(is_a($config_file, 'Config_Group')) {
			$config_file->set('cfg_name', $config_file->group_name());
			$element_config = $config_file->as_array();
		}
		else {
			// Load element config
			$element_config = self::_get_element_config($config_file);
			$element_config['cfg_name'] = $config_file;
		}


		return new Element($element_config);
	}
public static function factory($config_file = 'bootstrap')
	{
		if(is_a($config_file, 'Config_Group')) {
			$config_file->set('cfg_name', $config_file->group_name());
			$element_config = $config_file->as_array();
		}
		else {
			// Load element config
			$element_config = self::_get_element_config($config_file);
			$element_config['cfg_name'] = $config_file;
		}


		return new Element($element_config);
	}
public static function factory ( $ config_file = 'bootstrap' ) { if ( is_a ( $ config_file , 'Config_Group' ) ) { $ config_file -> set ( 'cfg_name' , $ config_file -> group_name ( ) ) ; $ element_config = $ config_file -> as_array ( ) ; } else { // Load element config $ element_config = self :: _get_element_config ( $ config_file ) ; $ element_config [ 'cfg_name' ] = $ config_file ; } return new Element ( $ element_config ) ; }
Instantiate a new Element

@param string $config_file File name in config/navigation/ or a Config_Group instance
@throws Kohana_Exception
@return Element
@since 2.0
Instantiate a new Element