Documentation
- 1 Getting started
- 2 Integrated fundamentals
- 3 Content store
- 3.1 Creating a document type
- 3.2 Integrated relations in code
- 3.3 Adding custom styles to editor
- 3.4 Adding menu items to the Integrated backend
- 3.5 Publication status of a content item
- 4 Blocks
- 5 Multi channel publishing
- 6 Storage
- 7 Themes and templating
- 8 Solr
- 9 Contributing
- 9 Social media
- 9 Users
3.2 Integrated relations in code
Integrated Relations can be used in code. Every variety of content supports these functions. Below, various Integrated Relations are listed.
Returning a collection containing the embedded Relation documents:
1 | $content->getRelations(); |
Returning one embedded Relation document based on the relationId of the embedded Relation document:
1 | $content->getRelation($relationId); |
Returning a collection containing the embedded Relation document based on the relationType:
1 | $content->getRelationsByRelationType($relationType); |
Returning a collection containing all the references based on the embedded Relation documents that match $relationType:
1 | $content->getReferencesByRelationType($relationType); |
Returning a collection containing all the references based on the embedded Relation documents that match the relation with $relationId (use this function with care, because an admin user may delete the relation):
1 | $content->getReferencesByRelationId($relationId); |
Returning the first reference based on the embedded Relation documents that match the relation with $relationId (use this function with care, because an admin user may delete the relation):
1 | $content->getFirstReferenceByRelationId($relationId); |