/** * Count the number of resources in a workspace * * @param Workspace $workspace * * @return integer */ public function countResources(Workspace $workspace) { //@todo count directory from dql $root = $this->resourceManager->getWorkspaceRoot($workspace); if (!$root) { return 0; } $descendants = $this->resourceManager->getDescendants($root); return count($descendants); }