当前位置: 首页>>代码示例>>PHP>>正文


PHP Event::getParameter方法代码示例

本文整理汇总了PHP中thebuggenie\core\framework\Event::getParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP Event::getParameter方法的具体用法?PHP Event::getParameter怎么用?PHP Event::getParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thebuggenie\core\framework\Event的用法示例。


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

示例1: testParameters

 /**
  * @covers \thebuggenie\core\framework\Event::getParameters
  * @covers \thebuggenie\core\framework\Event::getParameter
  * @depends testCreateNew
  */
 public function testParameters(\thebuggenie\core\framework\Event $event)
 {
     $this->assertArrayHasKey('param1', $event->getParameters());
     $this->assertEquals(1, $event->getParameter('param1'));
     $this->assertArrayHasKey('param2', $event->getParameters());
     $this->assertEquals(2, $event->getParameter('param2'));
 }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:12,代码来源:EventTest.php

示例2: listen_accountSaveNotificationSettings

 public function listen_accountSaveNotificationSettings(framework\Event $event)
 {
     $request = $event->getParameter('request');
     $notificationsettings = $this->_getNotificationSettings();
     foreach ($notificationsettings as $setting => $description) {
         if ($request->hasParameter('mailing_' . $setting)) {
             framework\Context::getUser()->setNotificationSetting($setting, true, 'mailing')->save();
         } else {
             framework\Context::getUser()->setNotificationSetting($setting, false, 'mailing')->save();
         }
     }
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:12,代码来源:Mailing.php

示例3: listen_projectconfig_panel

 public function listen_projectconfig_panel(framework\Event $event)
 {
     include_component('vcs_integration/projectconfig_panel', array('selected_tab' => $event->getParameter('selected_tab'), 'access_level' => $event->getParameter('access_level'), 'project' => $event->getParameter('project')));
 }
开发者ID:AzerothShard,项目名称:thebuggenie,代码行数:4,代码来源:Vcs_integration.php

示例4: listen_MenustripLinks

 /**
  * Header wiki menu and search dropdown / list
  *
  * @Listener(module="core", identifier="templates/headermainmenu::projectmenulinks")
  *
  * @param \thebuggenie\core\framework\Event $event
  */
 public function listen_MenustripLinks(framework\Event $event)
 {
     $project_url = framework\Context::isProjectContext() ? framework\Context::getRouting()->generate('publish_article', array('article_name' => ucfirst(framework\Context::getCurrentProject()->getKey()) . ':MainPage')) : null;
     $wiki_url = framework\Context::isProjectContext() && framework\Context::getCurrentProject()->hasWikiURL() ? framework\Context::getCurrentProject()->getWikiURL() : null;
     $url = framework\Context::getRouting()->generate('publish');
     framework\ActionComponent::includeComponent('publish/menustriplinks', array('url' => $url, 'project_url' => $project_url, 'wiki_url' => $wiki_url, 'selected_tab' => $event->getParameter('selected_tab')));
 }
开发者ID:nrensen,项目名称:thebuggenie,代码行数:14,代码来源:Publish.php

示例5: listenIssueSaveAddComment

 public function listenIssueSaveAddComment(\thebuggenie\core\framework\Event $event)
 {
     $this->comment_lines = $event->getParameter('comment_lines');
     $this->comment = $event->getParameter('comment');
 }
开发者ID:nrensen,项目名称:thebuggenie,代码行数:5,代码来源:Main.php

示例6: listen_accountSaveNotificationSettings

 public function listen_accountSaveNotificationSettings(framework\Event $event)
 {
     $request = $event->getParameter('request');
     $notificationsettings = $this->_getNotificationSettings();
     foreach ($notificationsettings as $setting => $description) {
         if ($request->hasParameter('mailing_' . $setting)) {
             framework\Context::getUser()->setNotificationSetting($setting, true, 'mailing')->save();
         } else {
             framework\Context::getUser()->setNotificationSetting($setting, false, 'mailing')->save();
         }
     }
     // Currently you can only select one category of new issues to be notified regardless of multiple modules implementing notifications. However in this module's code local constant "NOTIFY_NEW_ISSUES_MY_PROJECTS_CATEGORY" will be referenced and that's why code below update its value based on core module's notifications settings.
     if ($request->hasParameter('core_' . framework\Settings::SETTINGS_USER_NOTIFY_NEW_ISSUES_MY_PROJECTS_CATEGORY)) {
         framework\Context::getUser()->setNotificationSetting(self::NOTIFY_NEW_ISSUES_MY_PROJECTS_CATEGORY, $request->getParameter('core_' . framework\Settings::SETTINGS_USER_NOTIFY_NEW_ISSUES_MY_PROJECTS_CATEGORY), 'mailing')->save();
     } else {
         framework\Context::getUser()->setNotificationSetting(self::NOTIFY_NEW_ISSUES_MY_PROJECTS_CATEGORY, false, 'mailing')->save();
     }
 }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:18,代码来源:Mailing.php

示例7: listenPublishFixtureArticleCreated

 public function listenPublishFixtureArticleCreated(\thebuggenie\core\framework\Event $event)
 {
     $this->cliEcho($event->getParameter('imported') ? "Importing " : "Skipping ");
     $this->cliEcho($event->getSubject() . "\n", 'white', 'bold');
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:5,代码来源:Import.php

示例8: listen_accountSaveNotificationSettings

 public function listen_accountSaveNotificationSettings(framework\Event $event)
 {
     $request = $event->getParameter('request');
     $notificationsettings = $this->_getNotificationSettings();
     $category_key = self::NOTIFY_NEW_ISSUES_MY_PROJECTS_CATEGORY;
     foreach ($notificationsettings as $setting => $description) {
         if ($setting == $category_key) {
             continue;
         }
         if ($request->hasParameter('mailing_' . $setting)) {
             framework\Context::getUser()->setNotificationSetting($setting, true, 'mailing')->save();
         } else {
             framework\Context::getUser()->setNotificationSetting($setting, false, 'mailing')->save();
         }
     }
     foreach ($event->getParameter('categories') as $category_id => $category) {
         if ($request->hasParameter('mailing_' . $category_key . '_' . $category_id)) {
             framework\Context::getUser()->setNotificationSetting($category_key . '_' . $category_id, true, 'mailing')->save();
         } else {
             framework\Context::getUser()->setNotificationSetting($category_key . '_' . $category_id, false, 'mailing')->save();
         }
     }
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:23,代码来源:Mailing.php


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