getGraph
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn morexPDOObject::getGraph¶
Loads a graph of related objects onto the current object. The $graph argument controls how much is loaded:
-
true(default) — the entire relation graph, up to the maximum depth. - an integer — related objects up to that depth.
- a JSON string — the graph definition, as used by
getCollectionGraph(). - an array — the graph definition in array form.
Returns the loaded graph, or false if nothing was loaded.
Syntax¶
array|boolean getGraph ([boolean|string|array|integer $graph = true], [mixed $criteria = null], [boolean|integer $cacheFlag = true])
Example¶
$resource = $modx->getObject('modResource', 42);
$graph = $resource->getGraph('{"Template":{},"TemplateVarResources":{"TemplateVar":{}}}');
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










