Skip to content
New issue

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

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

Already on GitHub? Sign in 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 {
     // ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant