Skip to content

Commit

Permalink
Merge pull request #23 from jonnitto/bugfix/resource_image_source
Browse files Browse the repository at this point in the history
BUGFIX: Fix broken ResourceImageSource
  • Loading branch information
mficzel committed Aug 15, 2020
2 parents 442dfec + d89ae4d commit 948e457
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Classes/EelHelpers/ResourceImageSourceHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ class ResourceImageSourceHelper extends AbstractImageSourceHelper
* @param string $package
* @param string $path
*/
public function __construct(string $package, string $path)
public function __construct(?string $package, string $path)
{
$this->package = $package;
$this->path = $path;
}

public function src(): string
{
return $this->resourceManager->getPublicPackageResourceUri($this->package, $this->path);
if ($this->package) {
return $this->resourceManager->getPublicPackageResourceUri($this->package, $this->path);
}
return $this->resourceManager->getPublicPackageResourceUriByPath($this->path);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
prototype(Sitegeist.Kaleidoscope:ResourceImageSource) {
@class = 'Sitegeist\\Kaleidoscope\\FusionObjects\\ResourceImageSourceImplementation'
path = null
package = false
package = null
}

0 comments on commit 948e457

Please sign in to comment.