コード例 #1
0
ファイル: ToolManager.php プロジェクト: ngydat/CoreBundle
 /**
  * @param string[]                                                 $roles
  * @param \Claroline\CoreBundle\Entity\Workspace\Workspace $workspace
  *
  * @return \Claroline\CoreBundle\Entity\Tool\OrderedTool[]
  */
 public function getOrderedToolsByWorkspaceAndRoles(Workspace $workspace, array $roles, $type = 0)
 {
     if ($workspace->isPersonal()) {
         return $this->orderedToolRepo->findPersonalDisplayableByWorkspaceAndRoles($workspace, $roles, $type);
     }
     return $this->orderedToolRepo->findByWorkspaceAndRoles($workspace, $roles, $type);
 }