Created
May 26, 2011 23:39
-
-
Save Mark-H/994365 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$queryGraph = array(); | |
if ($includeBrand) { $queryGraph[] = '"Brand":{}'; } | |
if ($includeImages) { $queryGraph[] = '"Images":{}'; } | |
if ($includeOwner) { $queryGraph[] = '"Owner":{}'; } | |
if ($includeOptions) { $queryGraph[] = '"CamperOptions":{ "Options":{} }'; } | |
$queryGraph = '{ '.implode(', ',$queryGraph).' }'; | |
//echo '<pre>'.print_r($query->query,true).'</pre>'; | |
$campers = $modx->getCollectionGraph('cmCamper',$queryGraph,$query); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment