Get URL to web resource

@param string                $resource
@param \Laranix\Themer\Theme $theme
@return string
430402
public function getThemeResourceUrl(string $resource, Theme $theme = null) : string
    {
        return $this->createPath($this->getThemeBaseUrl($theme), $resource);
    }
399205
protected function renderTag(Resource $resource) {
		$tag = new Tag('link');
		
		$tag->rel  = 'stylesheet';
		$tag->type = 'text/css';
		$tag->href = $resource->getUrl();
		
		return $tag->render();
	}
876376
public function resolvePath($resource)
    {
        // Skip blank resources
        if (empty($resource)) {
            return null;
        }
        $resourceObj = $this->resolveResource($resource);
        if ($resourceObj instanceof ModuleResource) {
            return $resourceObj->getRelativePath();
        }
        return $resource;
    }
597122
public function getResourceUri($resource)
    {
        if (! Str::contains($resource, '.')) {
            return $resource;
        }

        // Once we have built the base URI, we'll remove the wildcard holder for this
        // base resource name so that the individual route adders can suffix these
        // paths however they need to, as some do not have any wildcards at all.
        $segments = explode('.', $resource);

        $uri = $this->getNestedResourceUri($segments);

        return str_replace('/{'.$this->getResourceWildcard(end($segments)).'}', '', $uri);
    }
937657
public function getResource($resource)
    {
        if ($this->resourceExists($resource)) return $this->_resources[$resource];

        throw new ContainerResourceNotFoundException('Resource ' . $resource . ' does not exist in the Container');
    }
1082405
public function supports($resource)
    {
        return $resource === ''
            || $this->getIssue($resource)
            || $this->jiraService->urlMatches($resource);
    }
870844
public function themePaths(string $resource): array
    {
        $paths = [];

        if (file_exists($this->sourceDirectory.'/'.$resource)) {
            $paths[] = $resource;
        }

        if (null === $this->theme) {
            return $paths;
        }

        $themeResource = $this->findThemeResource($this->theme, $resource);
        if (null !== $themeResource) {
            $paths[] = $themeResource;
        }

        if (isset($this->theme['parent'])) {
            $themeResource = $this->findThemeResource($this->theme['parent'], $resource);
            if (null !== $themeResource) {
                $paths[] = $themeResource;
            }
        }

        return array_reverse($paths);
    }
1180611
public static function inTheme($theme)
    {
        if (is_string($theme)) {
            $theme = Theme::load($theme);
        }

        return static::on($theme->getDirName());
    }
709804
public static function getMimesAccept($resource)
    {
        $attachmentMimes = AttachmentMime::builder()->where('resource_id_019', $resource)->get();

        $index = 1;
        $mimes = null;
        foreach($attachmentMimes as $attachmentMime)
        {
            $mimes .= "'" . $attachmentMime->mime_019 . "'";

            if($index < count($attachmentMimes))
                $mimes .= ", ";

            $index ++;
        }

        return $mimes;
    }
625487
static function theme_url_to_dir( $src ) 	{
		$site_root = trailingslashit(get_theme_root_uri()).get_stylesheet();
		$tmp = str_replace($site_root, '', $src);
		//$tmp = trailingslashit(get_theme_root()).get_stylesheet().$tmp;
		$tmp = get_stylesheet_directory().$tmp;
		if ( realpath($tmp) ) {
			return realpath($tmp);
		}
		return $tmp;
	}
692828
public static URL getResourceUrl(String resource, Class<?> baseClass) {
		return ResourceUtil.getResource(resource, baseClass);
	}
1369721
public function themeUrl($url = null)
    {
        $themeDir = $this->getTheme()->getDirName();

        if (is_array($url)) {
            $_url = Url::to(CombineAssets::combine($url, themes_path().'/'.$themeDir));
        }
        else {
            $_url = Config::get('cms.themesPath', '/themes').'/'.$themeDir;
            if ($url !== null) {
                $_url .= '/'.$url;
            }
            $_url = Url::asset($_url);
        }

        return $_url;
    }
297701
public function themePath(string $resource): string
    {
        if (null === $this->theme) {
            return $resource;
        }

        if (file_exists($this->sourceDirectory.'/'.$resource)) {
            return $resource;
        }

        $themeResource = $this->findThemeResource($this->theme, $resource);
        if (null !== $themeResource) {
            return $themeResource;
        }

        if (isset($this->theme['parent'])) {
            $themeResource = $this->findThemeResource($this->theme['parent'], $resource);
            if (null !== $themeResource) {
                return $themeResource;
            }
        }

        return $resource;
    }
788681
public function getServerPathForResource(PuliResource $resource)
    {
        $relPath = Path::makeRelative($resource->getRepositoryPath(), $this->basePath);

        return '/'.trim($this->mapping->getServerPath().'/'.$relPath, '/');
    }
67192
public function createThemeUrl($module = null, $theme = null)
    {
        return $this->createSharedThemePath($module, $theme, '/'.self::TEMPLATE_PARAM_MODULES_DIR);
    }
1039917
public function get($resource)
    {
        $path = $this->getSourcePath($resource);

        if (!file_exists($path)) {
            throw new \RuntimeException('There is no cached value for '.$resource);
        }

        return include $path;
    }
198288
public function symlink($theme)
    {
        $trace = debug_backtrace();

        if (! isset($trace[1])) return;

        $link = str_replace($this->getThemeName(), $theme, array_get($trace[1], 'file'));

        extract($this->arguments);
        extract($this->view->getShared());

        return require($link);
    }