最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - How do I get a flexform value in my repository? - Stack Overflow

programmeradmin0浏览0评论

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.

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.

Share Improve this question edited Mar 13 at 10:50 DarkBee 15.5k8 gold badges72 silver badges118 bronze badges asked Mar 13 at 10:33 user500665user500665 1,3801 gold badge13 silver badges45 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

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'])

发布评论

评论列表(0)

  1. 暂无评论