php-tmdb / symfony

Symfony 4,5 and 6 Bundle for TMDB ( The Movie Database ) API. Provides easy access to the php-tmdb/api library.
MIT License
35 stars 27 forks source link

Possibility to filter url_poster in twig view #1

Closed welcoMattic closed 10 years ago

welcoMattic commented 10 years ago

Hi,

Is there possible to pass a url_poster as string to the image filter in a twig view ?

Thanks

wtfzdotnet commented 10 years ago

Hi @welcoMattic ,

Currently string path's only are not supported, the helper always expects an Image object currently (which holds the path in $filePath ). I think the ImageFactory would help you out here though, review this method https://github.com/wtfzdotnet/php-tmdb-api/blob/master/lib/Tmdb/Factory/ImageFactory.php#L47 and let me know if that helps you any further. :-)

wtfzdotnet commented 10 years ago

I've given this some thought, although I find it very unlikely for Symfony2 implementations to skip the modeled approach, the filter should still work for API implementations. I'll fix this later tonight in the development branch of php-tmdb-api.

wtfzdotnet commented 10 years ago

Fixed in the development branch, see https://github.com/wtfzdotnet/php-tmdb-api/commit/d443ad6e339a89759d491eaac976355fb08e955c.

Please make sure you post issues in the correct repository next time :-).