phptypo3typo3-11.x

How do I get a flexform value in my repository?


I have a plugin that filters items, but I want to be able to set the limit in the plugin options.

I added a flexform field, I just need to be able to bring that value into my repository php where the query is made?

So I can set the limit $query->setLimit($mylimit);

I have read the documentation about it here but am a bit lost on how to do it.


Solution

  • In your action, flexform-settings are available via $this->settings. Just pass your limit to the called method of your repository: ItemRepository->findAllFilteredByXy($xy, $this->settings['limit'])