public static function getComponentStylesheet($component, $stylesheet, $dir = 'css')
	{
		$template = 'system';
		if ($t = self::app('template'))
		{
			$template = self::app('template')->template;
		}

		$paths = array();
		$paths[] = DS . 'templates' . DS . $template . DS . 'html' . DS . $component . DS . $stylesheet;
		$paths[] = DS . 'components' . DS . $component . DS . 'assets' . ($dir ? DS . $dir : '') . DS . $stylesheet;
		$paths[] = DS . 'components' . DS . $component . DS . $folder . DS . $stylesheet;

		$root = self::base();

		// Run through each path until we find one that works
		foreach ($paths as $path)
		{
			if (file_exists($root . $path))
			{
				// Push script to the document
				return rtrim(Request::base(true), '/') . $path;
			}
		}
	}
public static function getComponentStylesheet($component, $stylesheet, $dir = 'css')
	{
		$template = 'system';
		if ($t = self::app('template'))
		{
			$template = self::app('template')->template;
		}

		$paths = array();
		$paths[] = DS . 'templates' . DS . $template . DS . 'html' . DS . $component . DS . $stylesheet;
		$paths[] = DS . 'components' . DS . $component . DS . 'assets' . ($dir ? DS . $dir : '') . DS . $stylesheet;
		$paths[] = DS . 'components' . DS . $component . DS . $folder . DS . $stylesheet;

		$root = self::base();

		// Run through each path until we find one that works
		foreach ($paths as $path)
		{
			if (file_exists($root . $path))
			{
				// Push script to the document
				return rtrim(Request::base(true), '/') . $path;
			}
		}
	}
public static function getComponentStylesheet ( $ component , $ stylesheet , $ dir = 'css' ) { $ template = 'system' ; if ( $ t = self :: app ( 'template' ) ) { $ template = self :: app ( 'template' ) -> template ; } $ paths = array ( ) ; $ paths [ ] = DS . 'templates' . DS . $ template . DS . 'html' . DS . $ component . DS . $ stylesheet ; $ paths [ ] = DS . 'components' . DS . $ component . DS . 'assets' . ( $ dir ? DS . $ dir : '' ) . DS . $ stylesheet ; $ paths [ ] = DS . 'components' . DS . $ component . DS . $ folder . DS . $ stylesheet ; $ root = self :: base ( ) ; // Run through each path until we find one that works foreach ( $ paths as $ path ) { if ( file_exists ( $ root . $ path ) ) { // Push script to the document return rtrim ( Request :: base ( true ) , '/' ) . $ path ; } } }
Gets the path to a component stylesheet
checks template overrides first, then component

@param   string  $component   Component name
@param   string  $stylesheet  Stylesheet to look for
@param   string  $dir         Asset directory to look in
@return  string  Path to a stylesheet
Gets the path to a component stylesheet checks template overrides first then component