Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

[TASK] Adds an example how to add attributes. #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pfinkbeiner
Copy link

With that commit comes the ability to add a specific title and
description to an image directly while uploading them.

There is even more possible like adding links or alternative text or any
other already existing field in sys_file_reference table. Even
extending the sys_file_reference reference is possible and fill it up with custom
data. Just extend the FileReference model in your extension, assign your
content via the model setter in UploadedFileReferenceConverter and thats
it. Happy uploading.

With that commit comes the ability to add a specific title and
description to an image directly while uploading them.

There is even more possible like adding links or alternative text or any
other already existing field in sys_file_reference table. Even
extending the sys_file_reference reference is possible and fill it up with custom
data. Just extend the FileReference model in your extension, assign your
content via the model setter in UploadedFileReferenceConverter and thats
it. Happy uploading.
Also improves the storage handling of additionalAttributes.
If the given value is empty, even after trimming, it uses NULL as value.
The same as the origin value.
@pfinkbeiner
Copy link
Author

Well, I removed that obsolete mysql_real… and htmlspecial… stuff. I also wrote a fallback if the given values are empty it will act a more natural way and NULL will be stored in the DB. In TYPO3 backend you'll see the checkboxes only checked if it contains valid content.

Maybe the PersistentObjectConverter is the right way to store that additional attributes in more »extbase way«, but for know it should do the trick. I would really appreciate it to see such a solution implemented in the extension_kickstarter!

screen shot 2014-07-17 at 20 44 33

helhum pushed a commit that referenced this pull request May 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants