documentation-developer
documentation-developer copied to clipboard
5.0: Use RelationListIterator
| Question | Answer |
|---|---|
| JIRA Ticket | N/A |
| Versions | 5.0 |
| Edition | All |
To get all relations, use RelationListIteratorAdapter + BatchIterator instead of ContentService::countRelations() + ContentService::loadRelationList()
Follows #2544 and in particular this comment.
Previews:
- Content management > Content API > Browsing content > Viewing content metadata > Relations
- https://doc.ibexa.co/en/5.0/content_management/content_api/browsing_content/#relations
- https://ez-systems-developer-documentation--2548.com.readthedocs.build/en/2548/content_management/content_api/browsing_content/#relations
- Templating > Embed and list content > Embed content > Embed Relations with a custom controller
- https://doc.ibexa.co/en/5.0/templating/embed_and_list_content/embed_content/#embed-relations-with-a-custom-controller
- https://ez-systems-developer-documentation--2548.com.readthedocs.build/en/2548/templating/embed_and_list_content/embed_content/#embed-relations-with-a-custom-controller
Checklist
- [ ] Text renders correctly
- [ ] Text has been checked with vale
- [ ] Description metadata is up to date
- [ ] Redirects cover removed/moved pages
- [ ] Code samples are working
- [ ] PHP code samples have been fixed with PHP CS fixer
- [ ] Added link to this PR in relevant JIRA ticket or code PR
Preview of modified files
Preview of modified Markdown: