/** * Render the URI to the resource. The filename is used from child content. * * @param string $path The path and filename of the resource (relative to Public resource directory of the package) * @param string $package Target package key. If not set, the current package key will be used * @param \F3\FLOW3\Resource\Resource $resource If specified, this resource object is used instead of the path and package information * @param string $title If specified, this title is added to the resource uri to make it more descriptive * @return string The absolute URI to the resource * @author Robert Lemke <*****@*****.**> * @api */ public function render($path = NULL, $package = NULL, $resource = NULL, $title = '') { if ($resource === NULL) { if ($path === NULL) { return '!!! No path specified in uri.resource view helper !!!'; } $uri = $this->resourcePublisher->getStaticResourcesWebBaseUri() . 'Packages/' . ($package === NULL ? $this->controllerContext->getRequest()->getControllerPackageKey() : $package) . '/' . $path; } else { $uri = $this->resourcePublisher->getPersistentResourceWebUri($resource, $title); if ($uri === FALSE) { $uri = $this->resourcePublisher->getStaticResourcesWebBaseUri() . 'BrokenResource'; } } return $uri; }