當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ObjectManager::getRepository方法代碼示例

本文整理匯總了PHP中Claroline\CoreBundle\Persistence\ObjectManager::getRepository方法的典型用法代碼示例。如果您正苦於以下問題:PHP ObjectManager::getRepository方法的具體用法?PHP ObjectManager::getRepository怎麽用?PHP ObjectManager::getRepository使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Claroline\CoreBundle\Persistence\ObjectManager的用法示例。


在下文中一共展示了ObjectManager::getRepository方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @DI\InjectParams({
  *     "om"                    = @DI\Inject("claroline.persistence.object_manager"),
  *     "pagerFactory"          = @DI\Inject("claroline.pager.pager_factory")
  * })
  */
 public function __construct(ObjectManager $om, PagerFactory $pagerFactory)
 {
     $this->om = $om;
     $this->pagerFactory = $pagerFactory;
     $this->chatRoomMessageRepo = $om->getRepository('ClarolineChatBundle:ChatRoomMessage');
     $this->chatUserRepo = $om->getRepository('ClarolineChatBundle:ChatUser');
 }
開發者ID:kitan1982,項目名稱:ChatBundle,代碼行數:13,代碼來源:ChatManager.php

示例2: getAllResourceTypesAsChoices

 public function getAllResourceTypesAsChoices()
 {
     $resourceTypes = $this->om->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAllTypeNames();
     $resourceTypes[] = array('name' => 'workspace');
     $excludeTypes = array('directory');
     return $this->sortAlphabeticallyResourceTypesForChoices($resourceTypes, $excludeTypes);
 }
開發者ID:claroline,項目名稱:distribution,代碼行數:7,代碼來源:PortalManager.php

示例3: __construct

 /**
  * @DI\InjectParams({
  *      "om"        = @DI\Inject("claroline.persistence.object_manager")
  * })
  */
 public function __construct(ObjectManager $om)
 {
     $this->om = $om;
     $this->sectionRepository = $this->om->getRepository('IcapWikiBundle:Section');
     $this->contributionRepository = $this->om->getRepository('IcapWikiBundle:Contribution');
     $this->userRepository = $this->om->getRepository('ClarolineCoreBundle:User');
 }
開發者ID:claroline,項目名稱:distribution,代碼行數:12,代碼來源:WikiManager.php

示例4: __construct

 /**
  * Constructor.
  *
  * @DI\InjectParams({
  *     "om" = @DI\Inject("claroline.persistence.object_manager")
  * })
  */
 public function __construct(ObjectManager $om)
 {
     $this->homeTabRepo = $om->getRepository('ClarolineCoreBundle:Home\\HomeTab');
     $this->homeTabConfigRepo = $om->getRepository('ClarolineCoreBundle:Home\\HomeTabConfig');
     $this->widgetHomeTabConfigRepo = $om->getRepository('ClarolineCoreBundle:Widget\\WidgetHomeTabConfig');
     $this->om = $om;
 }
開發者ID:ngydat,項目名稱:CoreBundle,代碼行數:14,代碼來源:HomeTabManager.php

示例5: __construct

 /**
  * @DI\InjectParams({
  *      "om"                 = @DI\Inject("claroline.persistence.object_manager"),
  *      "roleManager"        = @DI\Inject("claroline.manager.role_manager"),
  *      "authorization"        = @DI\Inject("security.authorization_checker")
  * })
  */
 public function __construct(ObjectManager $om, RoleManager $roleManager, AuthorizationCheckerInterface $authorization)
 {
     $this->om = $om;
     $this->rightsRepo = $om->getRepository('FormaLibrePresenceBundle:PresenceRights');
     $this->roleManager = $roleManager;
     $this->authorization = $authorization;
     $this->presenceRepo = $om->getRepository('FormaLibrePresenceBundle:Presence');
 }
開發者ID:claroline,項目名稱:distribution,代碼行數:15,代碼來源:PresenceManager.php

示例6: __construct

 /**
  * @DI\InjectParams({
  *     "om"           = @DI\Inject("claroline.persistence.object_manager"),
  *     "pagerFactory" = @DI\Inject("claroline.pager.pager_factory")
  * })
  */
 public function __construct(ObjectManager $om, PagerFactory $pagerFactory)
 {
     $this->om = $om;
     $this->pagerFactory = $pagerFactory;
     $this->resWidgetConfigRepo = $om->getRepository('ClarolineTagBundle:ResourcesTagsWidgetConfig');
     $this->taggedObjectRepo = $om->getRepository('ClarolineTagBundle:TaggedObject');
     $this->tagRepo = $om->getRepository('ClarolineTagBundle:Tag');
 }
開發者ID:kitan1982,項目名稱:TagBundle,代碼行數:14,代碼來源:TagManager.php

示例7: __construct

 /**
  * @DI\InjectParams({
  *     "om"           = @DI\Inject("claroline.persistence.object_manager"),
  *     "pagerFactory" = @DI\Inject("claroline.pager.pager_factory")
  * })
  */
 public function __construct(ObjectManager $om, PagerFactory $pagerFactory)
 {
     $this->om = $om;
     $this->pagerFactory = $pagerFactory;
     $this->categoryRepo = $om->getRepository('ClarolineCoreBundle:Contact\\Category');
     $this->contactRepo = $om->getRepository('ClarolineCoreBundle:Contact\\Contact');
     $this->optionsRepo = $om->getRepository('ClarolineCoreBundle:Contact\\Options');
 }
開發者ID:claroline,項目名稱:distribution,代碼行數:14,代碼來源:ContactManager.php

示例8: __construct

 /**
  * Constructor.
  *
  * @DI\InjectParams({
  *     "om"         = @DI\Inject("claroline.persistence.object_manager"),
  *     "router"     = @DI\Inject("router"),
  *     "translator" = @DI\Inject("translator")
  * })
  */
 public function __construct(ObjectManager $om, RouterInterface $router, TranslatorInterface $translator)
 {
     $this->om = $om;
     $this->widgetDisplayConfigRepo = $om->getRepository('ClarolineCoreBundle:Widget\\WidgetDisplayConfig');
     $this->widgetInstanceRepo = $om->getRepository('ClarolineCoreBundle:Widget\\WidgetInstance');
     $this->widgetRepo = $om->getRepository('ClarolineCoreBundle:Widget\\Widget');
     $this->router = $router;
     $this->translator = $translator;
 }
開發者ID:ngydat,項目名稱:CoreBundle,代碼行數:18,代碼來源:WidgetManager.php

示例9: __construct

 /**
  * @InjectParams({
  *     "om"              = @Inject("claroline.persistence.object_manager"),
  *     "translator"      = @Inject("translator"),
  *     "authorization"   = @Inject("security.authorization_checker"),
  *     "tokenStorage"    = @Inject("security.token_storage"),
  * })
  */
 public function __construct(TokenStorageInterface $tokenStorage, AuthorizationCheckerInterface $authorization, ObjectManager $om, TranslatorInterface $translator)
 {
     $this->om = $om;
     $this->translator = $translator;
     $this->tokenStorage = $tokenStorage;
     $this->authorization = $authorization;
     $this->panelRepo = $om->getRepository('ClarolineCoreBundle:Facet\\PanelFacet');
     $this->fieldRepo = $om->getRepository('ClarolineCoreBundle:Facet\\FieldFacet');
 }
開發者ID:ngydat,項目名稱:CoreBundle,代碼行數:17,代碼來源:FacetManager.php

示例10: __construct

 /**
  * @DI\InjectParams({
  *     "objectManager" = @DI\Inject("claroline.persistence.object_manager")
  * })
  */
 public function __construct(ObjectManager $objectManager)
 {
     $this->om = $objectManager;
     $this->resourceRepo = $objectManager->getRepository('ClarolineCoreBundle:Resource\\ResourceNode');
     $this->resourceTypeRepo = $objectManager->getRepository('ClarolineCoreBundle:Resource\\ResourceType');
     $this->userRepo = $objectManager->getRepository('ClarolineCoreBundle:User');
     $this->workspaceRepo = $objectManager->getRepository('ClarolineCoreBundle:Workspace\\Workspace');
     $this->logRepository = $objectManager->getRepository('ClarolineCoreBundle:Log\\Log');
 }
開發者ID:ngydat,項目名稱:CoreBundle,代碼行數:14,代碼來源:AnalyticsManager.php

示例11: indexAction

 /**
  * List resource Icons.
  *
  * @EXT\Route(
  *     "",
  *     name="claro_resource_icon_list",
  *     options={"expose"=true}
  * )
  * @EXT\Method("GET")
  */
 public function indexAction()
 {
     $resourceIcons = $this->om->getRepository('ClarolineCoreBundle:Resource\\ResourceIcon')->findByIsShortcut(false);
     $data = [];
     /** @var ResourceIcon $resourceIcon */
     foreach ($resourceIcons as $resourceIcon) {
         $data[$resourceIcon->getMimeType()] = $resourceIcon->getRelativeUrl();
     }
     return new JsonResponse($data);
 }
開發者ID:claroline,項目名稱:distribution,代碼行數:20,代碼來源:ResourceIconController.php

示例12: __construct

 /**
  * @DI\InjectParams({
  *     "om"         = @DI\Inject("claroline.persistence.object_manager"),
  *     "translator" = @DI\Inject("translator"),
  *     "converter"  = @DI\Inject("hevinci.competency.transfer_converter")
  * })
  *
  * @param ObjectManager         $om
  * @param TranslatorInterface   $translator
  * @param Converter             $converter
  */
 public function __construct(ObjectManager $om, TranslatorInterface $translator, Converter $converter)
 {
     $this->om = $om;
     $this->competencyRepo = $om->getRepository('HeVinciCompetencyBundle:Competency');
     $this->scaleRepo = $om->getRepository('HeVinciCompetencyBundle:Scale');
     $this->abilityRepo = $om->getRepository('HeVinciCompetencyBundle:Ability');
     $this->competencyAbilityRepo = $om->getRepository('HeVinciCompetencyBundle:CompetencyAbility');
     $this->translator = $translator;
     $this->converter = $converter;
 }
開發者ID:stefk,項目名稱:CompetencyBundle,代碼行數:21,代碼來源:CompetencyManager.php

示例13: __construct

 /**
  * Constructor.
  *
  * @DI\InjectParams({
  *     "om"              = @DI\Inject("claroline.persistence.object_manager"),
  *     "mailManager"     = @DI\Inject("claroline.manager.mail_manager"),
  *     "eventDispatcher" = @DI\Inject("claroline.event.event_dispatcher")
  * })
  */
 public function __construct(ObjectManager $om, MailManager $mailManager, StrictDispatcher $eventDispatcher)
 {
     $this->eventDispatcher = $eventDispatcher;
     $this->mailManager = $mailManager;
     $this->om = $om;
     $this->announcementRepo = $om->getRepository('ClarolineAnnouncementBundle:Announcement');
     $this->announcementsWidgetConfigRepo = $om->getRepository('ClarolineAnnouncementBundle:AnnouncementsWidgetConfig');
     $this->roleRepo = $om->getRepository('ClarolineCoreBundle:Role');
     $this->userRepo = $om->getRepository('ClarolineCoreBundle:User');
 }
開發者ID:claroline,項目名稱:distribution,代碼行數:19,代碼來源:AnnouncementManager.php

示例14: __construct

 /**
  * Constructor.
  *
  * @DI\InjectParams({
  *     "om"              = @DI\Inject("claroline.persistence.object_manager"),
  *     "pagerFactory"    = @DI\Inject("claroline.pager.pager_factory"),
  *     "translator"      = @DI\Inject("translator"),
  *     "eventDispatcher" = @DI\Inject("claroline.event.event_dispatcher"),
  *     "roleManager"     = @DI\Inject("claroline.manager.role_manager")
  * })
  */
 public function __construct(ObjectManager $om, PagerFactory $pagerFactory, TranslatorInterface $translator, StrictDispatcher $eventDispatcher, RoleManager $roleManager)
 {
     $this->om = $om;
     $this->groupRepo = $om->getRepository('ClarolineCoreBundle:Group');
     $this->userRepo = $om->getRepository('ClarolineCoreBundle:User');
     $this->pagerFactory = $pagerFactory;
     $this->translator = $translator;
     $this->eventDispatcher = $eventDispatcher;
     $this->roleManager = $roleManager;
 }
開發者ID:ChMat,項目名稱:CoreBundle,代碼行數:21,代碼來源:GroupManager.php

示例15: __construct

 /**
  * @DI\InjectParams({
  *     "om"              = @DI\Inject("claroline.persistence.object_manager"),
  *     "pagerFactory"    = @DI\Inject("claroline.pager.pager_factory"),
  *     "resourceManager" = @DI\Inject("claroline.manager.resource_manager"),
  *     "rightsManager"   = @DI\Inject("claroline.manager.rights_manager"),
  *     "roleManager"     = @DI\Inject("claroline.manager.role_manager"),
  *     "translator"      = @DI\Inject("translator")
  * })
  */
 public function __construct(ObjectManager $om, PagerFactory $pagerFactory, ResourceManager $resourceManager, RightsManager $rightsManager, RoleManager $roleManager, TranslatorInterface $translator)
 {
     $this->om = $om;
     $this->pagerFactory = $pagerFactory;
     $this->resourceManager = $resourceManager;
     $this->rightsManager = $rightsManager;
     $this->roleManager = $roleManager;
     $this->teamRepo = $om->getRepository('ClarolineTeamBundle:Team');
     $this->translator = $translator;
     $this->workspaceTeamParamsRepo = $om->getRepository('ClarolineTeamBundle:WorkspaceTeamParameters');
 }
開發者ID:claroline,項目名稱:distribution,代碼行數:21,代碼來源:TeamManager.php


注:本文中的Claroline\CoreBundle\Persistence\ObjectManager::getRepository方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。