PartyQuery - Querying a Party-based CRM
Party collects information from multiple entities and SQL tables so writing queries for this data can be difficult. For this reason Party
We recommend reading the site builder docs first, to get an understanding of the building blocks of Party module.
Some rough notes for what to cover here:
- explain data sets in more technical detail
Pieces are our silly name for tabs that appear below an individual party that allow the user to work with different aspects of it. Initially a party will look much like a node, and have just 'view' and 'edit', but as data sets are added each one provides a new tab. Other modules may provide further pieces, such as an activity log, or connections to external services.
The piece system allows the site builder to control the ordering and display of these tabs (which if each module was responsible for declaring its own tab would be more complex), allows party core to control access, and allows display to be overridden (with something such as panels, for instance).
Modules can declare a piece with hook_party_party_piece_info(), but a piece that corresponds to a data set can be declared within the declaration to hook_party_data_set_info().
Furthermore, when declaring a piece within a data set, there are three options:
- you can provide your own callback to display it
- you can let Party core display it
- you can let Party core display it with a default view
Party collects information from multiple entities and SQL tables so writing queries for this data can be difficult. For this reason Party