FileTitleViewHelper

Issue #53 resolved
Wim Roukema created an issue

This viewhelper knows one argument, i.e. "file". This can be a FileReference object (from Partials/MediaAsset/Detail.html or the argument can be a File object, f.i. from Partials/MediaAlbum/FlatList/AssetsList.html

The result is of course an error on wrong objecttype. I'm using version 2.0.1

Comments (9)

  1. Philipp Seßner

    I can confirm this, currently it is not possible to set a fixed intro image. The registerArgument method does not allow a notation like ClassA|ClassB, so I think the only solution is to set the allowed type as ‘mixed’ and later check the types in render method 😕

    Edit:

    Exakt Error message:

    The argument "file" was registered with type "TYPO3\CMS\Core\Resource\File", but is of type "TYPO3\CMS\Core\Resource\FileReference" in view helper "MiniFranske\FsMediaGallery\ViewHelpers\FileTitleViewHelper".

    Both classes implement TYPO3\CMS\Core\Resource\FileInterface. That would be a better alternative to ‘mixed’.

  2. Torben Hansen

    @Philipp Seßner I can not access your repository and get “Access denied”. Maybe there is something wrong with the access settings of your repository and therefore no PR is possible.

  3. Philipp Seßner

    @Torben Hansen Ah, the repository was marked private. I fixed that, you should be able to access it now!

  4. Log in to comment