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


PHP Event::addToReturnList方法代码示例

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


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

示例1: testReturnListAndReturnValue

 /**
  * @covers \thebuggenie\core\framework\Event::getReturnList
  * @covers \thebuggenie\core\framework\Event::addToReturnList
  * @covers \thebuggenie\core\framework\Event::setReturnValue
  * @covers \thebuggenie\core\framework\Event::getReturnValue
  * @depends testCreateNew
  */
 public function testReturnListAndReturnValue(\thebuggenie\core\framework\Event $event)
 {
     $this->assertArrayHasKey(0, $event->getReturnList());
     $this->assertContains('listitem1', $event->getReturnList());
     $this->assertArrayHasKey(1, $event->getReturnList());
     $this->assertContains('listitem2', $event->getReturnList());
     $event->addToReturnList('listitem3');
     $this->assertContains('listitem3', $event->getReturnList());
     $event->setReturnValue('fubar');
     $this->assertEquals('fubar', $event->getReturnValue());
     $event->setReturnValue(null);
     $this->assertEquals(null, $event->getReturnValue());
 }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:20,代码来源:EventTest.php

示例2: listen_get_backdrop_partial

 /**
  * @Listener(module='core', identifier='get_backdrop_partial')
  * @param \thebuggenie\core\framework\Event $event
  */
 public function listen_get_backdrop_partial(framework\Event $event)
 {
     if ($event->getSubject() == 'mailing_editincomingemailaccount') {
         $account = new IncomingEmailAccount(framework\Context::getRequest()->getParameter('account_id'));
         $event->addToReturnList($account, 'account');
         $event->setReturnValue('mailing/editincomingemailaccount');
         $event->setProcessed();
     }
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:13,代码来源:Mailing.php

示例3: listen_getcommit

 public function listen_getcommit(framework\Event $event)
 {
     if ($event->getSubject() == 'vcs_integration_getcommit') {
         $event->setReturnValue('vcs_integration/commitbackdrop');
         $event->addToReturnList(framework\Context::getRequest()->getParameter('commit_id'), 'commit_id');
         $event->setProcessed();
     }
 }
开发者ID:AzerothShard,项目名称:thebuggenie,代码行数:8,代码来源:Vcs_integration.php

示例4: Files__getUnattachedFiles

 /**
  * Removes an article from the list of flagged articles
  *
  * @param framework\Event $event
  */
 public function Files__getUnattachedFiles(framework\Event $event)
 {
     $event->setProcessed();
     $event->addToReturnList(ArticleFiles::getTable()->getLinkedFileIds());
 }
开发者ID:nrensen,项目名称:thebuggenie,代码行数:10,代码来源:Publish.php

示例5: listen_BreadcrumbProjectLinks

 public function listen_BreadcrumbProjectLinks(framework\Event $event)
 {
     $link = array('url' => framework\Context::getRouting()->generate('publish_article', array('article_name' => framework\Context::getCurrentProject()->getKey() . ':MainPage')), 'title' => $this->getMenuTitle(true));
     $event->addToReturnList($link);
 }
开发者ID:rianorie,项目名称:thebuggenie,代码行数:5,代码来源:Publish.php

示例6: listen_get_backdrop_partial

 /**
  * @Listener(module='core', identifier='get_backdrop_partial')
  * @param \thebuggenie\core\framework\Event $event
  */
 public function listen_get_backdrop_partial(framework\Event $event)
 {
     $request = framework\Context::getRequest();
     $options = array();
     switch ($event->getSubject()) {
         case 'agileboard':
             $template_name = 'agile/editagileboard';
             $board = $request['board_id'] ? entities\tables\AgileBoards::getTable()->selectById($request['board_id']) : new entities\AgileBoard();
             if (!$board->getID()) {
                 $board->setAutogeneratedSearch(\thebuggenie\core\entities\SavedSearch::PREDEFINED_SEARCH_PROJECT_OPEN_ISSUES);
                 $board->setTaskIssuetype(framework\Settings::get('issuetype_task'));
                 $board->setEpicIssuetype(framework\Settings::get('issuetype_epic'));
                 $board->setIsPrivate($request->getParameter('is_private', true));
                 $board->setProject($request['project_id']);
             }
             $options['board'] = $board;
             break;
         case 'milestone_finish':
             $template_name = 'agile/milestonefinish';
             $options['project'] = \thebuggenie\core\entities\tables\Projects::getTable()->selectById($request['project_id']);
             $options['board'] = entities\tables\AgileBoards::getTable()->selectById($request['board_id']);
             $options['milestone'] = \thebuggenie\core\entities\tables\Milestones::getTable()->selectById($request['milestone_id']);
             if (!$options['milestone']->hasReachedDate()) {
                 $options['milestone']->setReachedDate(time());
             }
             break;
         case 'agilemilestone':
             $template_name = 'agile/milestone';
             $options['project'] = \thebuggenie\core\entities\tables\Projects::getTable()->selectById($request['project_id']);
             $options['board'] = entities\tables\AgileBoards::getTable()->selectById($request['board_id']);
             if ($request->hasParameter('milestone_id')) {
                 $options['milestone'] = \thebuggenie\core\entities\tables\Milestones::getTable()->selectById($request['milestone_id']);
             }
             break;
         default:
             return;
     }
     foreach ($options as $key => $value) {
         $event->addToReturnList($value, $key);
     }
     $event->setReturnValue($template_name);
     $event->setProcessed();
 }
开发者ID:shoreless-Limited,项目名称:thebuggenie,代码行数:47,代码来源:Agile.php


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