• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Persistence\ObjectManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Claroline\CoreBundle\Persistence\ObjectManager的典型用法代码示例。如果您正苦于以下问题:PHP ObjectManager类的具体用法?PHP ObjectManager怎么用?PHP ObjectManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ObjectManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __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


示例2: __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


示例3: __construct

 /**
  * @DI\InjectParams({
  *       "om" = @DI\Inject("claroline.persistence.object_manager"),
  *       "ch" = @DI\Inject("claroline.config.platform_config_handler"),
  *       "cm" = @DI\Inject("claroline.manager.curl_manager")
  * })
  */
 public function __construct(ObjectManager $om, PlatformConfigurationHandler $ch, CurlManager $cm)
 {
     $this->om = $om;
     $this->repo = $om->getRepository('ClarolineCoreBundle:Organization\\Location');
     $this->ch = $ch;
     $this->cm = $cm;
 }
开发者ID:claroline,项目名称:distribution,代码行数:14,代码来源:LocationManager.php


示例4: load

 /**
  * Loads the core Home Tabs.
  *
  * @param ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     $translator = $this->container->get('translator');
     $infoName = $translator->trans('informations', array(), 'platform');
     $desktopHomeTab = new HomeTab();
     $desktopHomeTab->setType('admin_desktop');
     $desktopHomeTab->setName($infoName);
     $manager->persist($desktopHomeTab);
     $desktopHomeTabConfig = new HomeTabConfig();
     $desktopHomeTabConfig->setHomeTab($desktopHomeTab);
     $desktopHomeTabConfig->setType('admin_desktop');
     $desktopHomeTabConfig->setVisible(true);
     $desktopHomeTabConfig->setLocked(false);
     $desktopHomeTabConfig->setTabOrder(1);
     $manager->persist($desktopHomeTabConfig);
     $workspaceHomeTab = new HomeTab();
     $workspaceHomeTab->setType('admin_workspace');
     $workspaceHomeTab->setName($infoName);
     $manager->persist($workspaceHomeTab);
     $workspaceHomeTabConfig = new HomeTabConfig();
     $workspaceHomeTabConfig->setHomeTab($workspaceHomeTab);
     $workspaceHomeTabConfig->setType('admin_workspace');
     $workspaceHomeTabConfig->setVisible(true);
     $workspaceHomeTabConfig->setLocked(false);
     $workspaceHomeTabConfig->setTabOrder(1);
     $manager->persist($workspaceHomeTabConfig);
 }
开发者ID:ngydat,项目名称:CoreBundle,代码行数:32,代码来源:LoadHomeTabData.php


示例5: load

 public function load(ObjectManager $manager)
 {
     $repository = $manager->getRepository('Claroline\\CoreBundle\\Entity\\ContentTranslation');
     //mails
     $frTitle = 'Inscription à %platform_name%';
     $frContent = "<div>Votre nom d'utilisateur est %username%</div></br>";
     $frContent .= "<div>Votre mot de passe est %password%</div>";
     $frContent .= "<div>%validation_mail%</div>";
     $enTitle = 'Registration to %platform_name%';
     $enContent = "<div>You username is %username%</div></br>";
     $enContent .= "<div>Your password is %password%</div>";
     $enContent .= "<div>%validation_mail%</div>";
     $type = 'claro_mail_registration';
     $content = new Content();
     $content->setTitle($enTitle);
     $content->setContent($enContent);
     $content->setType($type);
     $repository->translate($content, 'title', 'fr', $frTitle);
     $repository->translate($content, 'content', 'fr', $frContent);
     $manager->persist($content);
     //layout
     $frLayout = '<div></div>%content%<div></hr>Powered by %platform_name%</div>';
     $enLayout = '<div></div>%content%<div></hr>Powered by %platform_name%</div>';
     $layout = new Content();
     $layout->setContent($enLayout);
     $layout->setType('claro_mail_layout');
     $repository->translate($layout, 'content', 'fr', $frLayout);
     $manager->persist($layout);
     $manager->flush();
 }
开发者ID:ngydat,项目名称:CoreBundle,代码行数:30,代码来源:LoadContentData.php


示例6: __construct

 /**
  * @DI\InjectParams({
  *     "om"             = @DI\Inject("claroline.persistence.object_manager"),
  *     "templating"     = @DI\Inject("templating"),
  *     "utils"          = @DI\Inject("claroline.utilities.misc"),
  *     "dispatcher"    = @DI\Inject("event_dispatcher")
  * })
  *
  * @param ObjectManager            $om
  * @param EngineInterface          $templating
  * @param ClaroUtilities           $utils
  * @param EventDispatcherInterface $dispatcher
  */
 public function __construct(ObjectManager $om, EngineInterface $templating, ClaroUtilities $utils, EventDispatcherInterface $dispatcher)
 {
     $this->om = $om;
     $this->templating = $templating;
     $this->utils = $utils;
     $this->dispatcher = $dispatcher;
     $this->logRepository = $om->getRepository('ClarolineCoreBundle:Log\\Log');
 }
开发者ID:claroline,项目名称:distribution,代码行数:21,代码来源:ResultManager.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

 /**
  * @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


示例9: __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


示例10: __construct

 /**
  * @DI\InjectParams({
  *     "om"          = @DI\Inject("claroline.persistence.object_manager"),
  *     "roleManager" = @DI\Inject("claroline.manager.role_manager"),
  *     "secUtils"    = @DI\Inject("claroline.security.utilities"),
  *     "container"   = @DI\Inject("service_container")
  * })
  */
 public function __construct(ObjectManager $om, RoleManager $roleManager, Utilities $secUtils, $container)
 {
     $this->om = $om;
     $this->roleManager = $roleManager;
     $this->secUtils = $secUtils;
     $this->container = $container;
     $this->profilePropertyRepo = $om->getRepository('ClarolineCoreBundle:ProfileProperty');
 }
开发者ID:ngydat,项目名称:CoreBundle,代码行数:16,代码来源:ProfilePropertyManager.php


示例11: load

 public function load(ObjectManager $manager)
 {
     $themes = $this->container->get('claroline.manager.theme_manager')->listStockThemeNames();
     foreach ($themes as $name) {
         $theme = new Theme();
         $theme->setName($name);
         $manager->persist($theme);
     }
 }
开发者ID:claroline,项目名称:distribution,代码行数:9,代码来源:LoadThemeData.php


示例12: __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


示例13: load

 public function load(ObjectManager $manager)
 {
     $names = array('header', 'left', 'content', 'right', 'footer');
     foreach ($names as $name) {
         $region = new Region();
         $region->setName($name);
         $manager->persist($region);
     }
 }
开发者ID:ngydat,项目名称:CoreBundle,代码行数:9,代码来源:LoadRegionData.php


示例14: __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


示例15: load

 public function load(ObjectManager $manager)
 {
     $fixtures = array('home', 'menu');
     foreach ($fixtures as $i => $fixture) {
         $types[$i] = new Type();
         $types[$i]->setName($fixture);
         $types[$i]->setPublish(true);
         $manager->persist($types[$i]);
     }
 }
开发者ID:ngydat,项目名称:CoreBundle,代码行数:10,代码来源:LoadTypeData.php


示例16: load

 public function load(ObjectManager $manager)
 {
     $themes = array('Claroline' => 'ClarolineCoreBundle:less:claroline/theme.html.twig', 'Claroline Orange' => 'ClarolineCoreBundle:less:claroline-orange/theme.html.twig', 'Claroline Mint' => 'ClarolineCoreBundle:less:claroline-mint/theme.html.twig', 'Claroline Gold' => 'ClarolineCoreBundle:less:claroline-gold/theme.html.twig', 'Claroline Ruby' => 'ClarolineCoreBundle:less:claroline-ruby/theme.html.twig', 'Claroline Black' => 'ClarolineCoreBundle:less:claroline-black/theme.html.twig', 'Claroline Dark' => 'ClarolineCoreBundle:less:claroline-dark/theme.html.twig', 'Bootstrap Default' => 'ClarolineCoreBundle:less:bootstrap-default/theme.html.twig');
     foreach ($themes as $name => $path) {
         $theme[$name] = new Theme();
         $theme[$name]->setName($name);
         $theme[$name]->setPath($path);
         $manager->persist($theme[$name]);
     }
 }
开发者ID:ChMat,项目名称:CoreBundle,代码行数:10,代码来源:LoadThemeData.php


示例17: __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


示例18: __construct

 /**
  * @DI\InjectParams({
  *     "authorization"   = @DI\Inject("security.authorization_checker"),
  *     "om"              = @DI\Inject("claroline.persistence.object_manager"),
  *     "resourceManager" = @DI\Inject("claroline.manager.resource_manager"),
  *     "tagManager"      = @DI\Inject("claroline.manager.tag_manager"),
  *     "tokenStorage"    = @DI\Inject("security.token_storage"),
  *     "utils"           = @DI\Inject("claroline.security.utilities")
  * })
  */
 public function __construct(AuthorizationCheckerInterface $authorization, ObjectManager $om, ResourceManager $resourceManager, TagManager $tagManager, TokenStorageInterface $tokenStorage, Utilities $utils)
 {
     $this->authorization = $authorization;
     $this->om = $om;
     $this->resourceManager = $resourceManager;
     $this->tagManager = $tagManager;
     $this->tokenStorage = $tokenStorage;
     $this->utils = $utils;
     $this->resourcesWidgetConfigRepo = $om->getRepository('ClarolineCoreBundle:Widget\\ResourcesWidgetConfig');
 }
开发者ID:claroline,项目名称:distribution,代码行数:20,代码来源:ResourcesWidgetManager.php


示例19: __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


示例20: __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



注:本文中的Claroline\CoreBundle\Persistence\ObjectManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Cml\Config类代码示例发布时间:2022-05-23
下一篇:
PHP Log\AbstractLogResourceEvent类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap