本文整理汇总了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'));
}
示例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();
}
}
}
示例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')));
}
示例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')));
}
示例5: listenIssueSaveAddComment
public function listenIssueSaveAddComment(\thebuggenie\core\framework\Event $event)
{
$this->comment_lines = $event->getParameter('comment_lines');
$this->comment = $event->getParameter('comment');
}
示例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();
}
}
示例7: listenPublishFixtureArticleCreated
public function listenPublishFixtureArticleCreated(\thebuggenie\core\framework\Event $event)
{
$this->cliEcho($event->getParameter('imported') ? "Importing " : "Skipping ");
$this->cliEcho($event->getSubject() . "\n", 'white', 'bold');
}
示例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();
}
}
}