grav-plugin-flex-objects icon indicating copy to clipboard operation
grav-plugin-flex-objects copied to clipboard

Flex object relations

Open stephan-strate opened this issue 4 years ago • 2 comments

The README.md / documentation says:

Flex objects can have relations to other Flex objects with few lines of code defining the relation

Is there any example or starting point for defining relations between flex objects?

stephan-strate avatar Dec 24 '20 22:12 stephan-strate

https://github.com/getgrav/grav/blob/1.7/system/src/Grav/Framework/Flex/Traits/FlexRelatedDirectoryTrait.php

You need to create your own classes and use the getCollectionByProperty() method to get the objects. You also need to create form fields for admin to list the objects, if you want to create relationships in admin.

mahagr avatar Jan 04 '21 12:01 mahagr

Hello, it would be very helpful just having a single example on how to create a relation between flex objects and how to manage them in Admin Plugin. Flex Objects are very powerful, and documentation would help unleash their full potential. Thanks!

phmg701 avatar Feb 09 '22 06:02 phmg701