Black
Black

Reputation: 20362

TYPO3 Extbase - Check if property in model x is set before adding it to container of model y

I have two models file and filecontainer.

Let's assume I have a checkbox in file called Allow to add.

File model

And I should only be able to add the file to the container of filecontainer, if the property Allow to add is set in that file and if possible show an alert if someone tries to add it even though Allow to add is not set.

Filecontainer

enter image description here

Is this possible?

PS: I just ask this question for learning purposes to see what is possible and what not.

Upvotes: 0

Views: 54

Answers (1)

M Klein
M Klein

Reputation: 563

I assume you use the TCA type select. You can specify a foreign_table_where clause there to filter the records shown from the file table.

Upvotes: 1

Related Questions