Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Optional support for AssetExtension for ImageTwigExtension #18

Open
alexander-schranz opened this issue Aug 28, 2019 · 0 comments
Open
Labels

Comments

@alexander-schranz
Copy link
Member

Currently the ImageExtension does not have support for asset function this should be introduce by optional injecting the AssetExtension of Symfony Twig Bridge.

E.g.:

services:
      Sulu\Twig\Extensions\ImageTwigExtension:
          arguments:
               - 'placeholders'
               - '@?twig.extension.assets'
public function __construct(
    ?string $placeholderPath = null, 
    ?AssetExtension $assetExtension, 
    ?string $defaultPackageName
) {
     // ...
}

public function getImage($media, $attributes = [], array $sources = [], ?string $packageName = null): string {
     // ...
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant