コード例 #1
0
 /**
  * Render the URI to the resource. The filename is used from child content.
  *
  * @param string $path The location of the resource, can be either a path relative to the Public resource directory of the package or a resource://... URI
  * @param string $package Target package key. If not set, the current package key will be used
  * @param Resource $resource If specified, this resource object is used instead of the path and package information
  * @param boolean $localize Whether resource localization should be attempted or not
  * @return string The absolute URI to the resource
  * @throws InvalidVariableException
  * @api
  */
 public function render($path = null, $package = null, Resource $resource = null, $localize = true)
 {
     $uri = parent::render($path, $package, $resource, $localize);
     $uri .= '?' . $this->cacheBreakingService->get();
     return $uri;
 }
コード例 #2
0
 /**
  * Updates the timestamp that is added to resources in order to break client side caching
  * of static resources.
  * Be sure to flush frontend caches afterwards (if applicable).
  */
 public function updateCommand()
 {
     $this->cacheBreakService->update();
 }