public static function getConfigByType($type)
	{
		$configPath = null;

		try {
			$templatePaths = CustomTemplate::getTemplates($type);
			if (!empty($templatePaths[0])) {
				$configPath = substr($templatePaths[0], 0, -6) . '_config.php';
			}
		}
		catch (\Exception $e) {
			$configPath = null;
		}

		if ($configPath === null || !file_exists($configPath)) {
			$allConfigs = array_merge(
				glob(TL_ROOT . '/templates/' . $type . '_config.php') ?: array(),
				glob(TL_ROOT . '/templates/*/' . $type . '_config.php') ?: array()
			);
			if (count($allConfigs)) {
				$configPath = $allConfigs[0];
			}
			else {
				return;
			}
		}

		$config = include $configPath;

		if ($config) {
			$config['fields'] = is_array($config['fields']) ? $config['fields'] : array();
		}

		return $config;
	}
public static function getConfigByType($type)
	{
		$configPath = null;

		try {
			$templatePaths = CustomTemplate::getTemplates($type);
			if (!empty($templatePaths[0])) {
				$configPath = substr($templatePaths[0], 0, -6) . '_config.php';
			}
		}
		catch (\Exception $e) {
			$configPath = null;
		}

		if ($configPath === null || !file_exists($configPath)) {
			$allConfigs = array_merge(
				glob(TL_ROOT . '/templates/' . $type . '_config.php') ?: array(),
				glob(TL_ROOT . '/templates/*/' . $type . '_config.php') ?: array()
			);
			if (count($allConfigs)) {
				$configPath = $allConfigs[0];
			}
			else {
				return;
			}
		}

		$config = include $configPath;

		if ($config) {
			$config['fields'] = is_array($config['fields']) ? $config['fields'] : array();
		}

		return $config;
	}
public static function getConfigByType ( $ type ) { $ configPath = null ; try { $ templatePaths = CustomTemplate :: getTemplates ( $ type ) ; if ( ! empty ( $ templatePaths [ 0 ] ) ) { $ configPath = substr ( $ templatePaths [ 0 ] , 0 , - 6 ) . '_config.php' ; } } catch ( \ Exception $ e ) { $ configPath = null ; } if ( $ configPath === null || ! file_exists ( $ configPath ) ) { $ allConfigs = array_merge ( glob ( TL_ROOT . '/templates/' . $ type . '_config.php' ) ? : array ( ) , glob ( TL_ROOT . '/templates/*/' . $ type . '_config.php' ) ? : array ( ) ) ; if ( count ( $ allConfigs ) ) { $ configPath = $ allConfigs [ 0 ] ; } else { return ; } } $ config = include $ configPath ; if ( $ config ) { $ config [ 'fields' ] = is_array ( $ config [ 'fields' ] ) ? $ config [ 'fields' ] : array ( ) ; } return $ config ; }
Get configuration array for the specified type

@param  string     $type Element type beginning with "rsce_"
@return array|null       Configuration array
Get configuration array for the specified type