Skip to content

Instantly share code, notes, and snippets.

@eculver
Created April 10, 2014 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eculver/10408733 to your computer and use it in GitHub Desktop.
Save eculver/10408733 to your computer and use it in GitHub Desktop.
if ($parentId) {
$parentCondition = "node-closure.ancestor = $parentId";
$parentCondition = "node-closure.depth = 1";
} else if ($rootId) {
$parentCondition = "node-closure.ancestor = $rootId";
}
$clientCondition = "node.clientId = $clientId";
$assetCrit->addExpr('where', $parentCondition)
->addExpr('where', $clientCondition);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment