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


PHP Context::isProjectContext方法代码示例

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


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

示例1: extractIssues

 public static function extractIssues($matches)
 {
     $issue = Issue::getIssueFromLink($matches["issues"]);
     if ($issue instanceof Issue) {
         if (!framework\Context::isProjectContext() || framework\Context::isProjectContext() && $issue->getProjectID() == framework\Context::getCurrentProject()->getID()) {
             $this->_quickfound_issues[] = $issue;
         }
     }
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:9,代码来源:SavedSearch.php

示例2: include_component

    }
    ?>
 text-align: center;">
                    <?php 
    include_component('configuration/permissionsinfoitem', array('key' => $key, 'target_id' => $target_id, 'type' => 'group', 'mode' => $mode, 'item_id' => $group->getID(), 'item_name' => $group->getName(), 'module' => $module, 'access_level' => $access_level));
    ?>
                </td>
            </tr>
            <?php 
    $cc++;
    ?>
        <?php 
}
?>
        <?php 
$teams = \thebuggenie\core\framework\Context::isProjectContext() ? \thebuggenie\core\framework\Context::getCurrentProject()->getAssignedTeams() : \thebuggenie\core\entities\Team::getAll();
?>
        <?php 
foreach ($teams as $team) {
    ?>
            <tr class="hover_highlight">
                <td style="padding: 2px;"><?php 
    echo '<b>' . __('Team: %team_name', array('%team_name' => '</b>' . $team->getName()));
    ?>
</td>
                <td style="padding: 2px; text-align: center;">
                    <?php 
    include_component('configuration/permissionsinfoitem', array('key' => $key, 'type' => 'team', 'target_id' => $target_id, 'mode' => $mode, 'item_id' => $team->getID(), 'item_name' => $team->getName(), 'module' => $module, 'access_level' => $access_level));
    ?>
                </td>
            </tr>
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:31,代码来源:_permissionsinfo.inc.php

示例3: isset

<?php

$article_name = isset($article_name) ? $article_name : '';
if (!\thebuggenie\core\framework\Context::isProjectContext() || \thebuggenie\core\framework\Context::isProjectContext() && mb_strtolower($article_name) != mb_strtolower(\thebuggenie\core\framework\Context::getCurrentProject()->getKey() . ':mainpage')) {
    if (\thebuggenie\core\framework\Context::isProjectContext()) {
        $tbg_response->addBreadcrumb(\thebuggenie\core\framework\Context::getModule('publish')->getMenuTitle(), make_url('publish_article', array('article_name' => \thebuggenie\core\framework\Context::getCurrentProject()->getKey() . ':MainPage')));
    } else {
        $tbg_response->addBreadcrumb(\thebuggenie\core\framework\Context::getModule('publish')->getMenuTitle(), make_url('publish_article', array('article_name' => 'MainPage')));
    }
    $items = explode(':', $article_name);
    $bcpath = array_shift($items);
    if (mb_strtolower($bcpath) == 'category') {
        $tbg_response->addBreadcrumb(__('Categories'));
        if (\thebuggenie\core\framework\Context::isProjectContext()) {
            $bcpath .= ":" . array_shift($items);
        }
    } elseif (!\thebuggenie\core\framework\Context::isProjectContext() && mb_strtolower($bcpath) != 'mainpage') {
        $tbg_response->addBreadcrumb($bcpath, make_url('publish_article', array('article_name' => $bcpath)));
    }
    foreach ($items as $bc_name) {
        $bcpath .= ":" . $bc_name;
        $tbg_response->addBreadcrumb($bc_name, make_url('publish_article', array('article_name' => $bcpath)));
    }
} else {
    $tbg_response->addBreadcrumb(\thebuggenie\core\framework\Context::getModule('publish')->getMenuTitle(), make_url('publish_article', array('article_name' => \thebuggenie\core\framework\Context::getCurrentProject()->getKey() . ':MainPage')));
}
开发者ID:founderio,项目名称:thebuggenie,代码行数:26,代码来源:_wikibreadcrumbs.inc.php

示例4: array

        }
        ?>
                        <?php 
        echo link_tag(make_url('client_dashboard', array('client_id' => $client->getID())), image_tag('tab_clients.png') . $client->getName());
        ?>
                    <?php 
    }
    ?>
                </div>
            </li>
        <?php 
}
?>
        <?php 
framework\Event::createNew('core', 'templates/headermainmenu::projectmenulinks', framework\Context::getCurrentProject())->trigger();
?>
    </ul>
    <?php 
if (framework\Context::isProjectContext() && !framework\Context::getCurrentProject()->isArchived() && !framework\Context::getCurrentProject()->isLocked() && ($tbg_user->canReportIssues() || $tbg_user->canReportIssues(framework\Context::getCurrentProject()->getID()))) {
    ?>
        <div class="reportissue_button_container">
        <?php 
    echo javascript_link_tag(image_tag('icon-mono-add.png') . __('Report an issue'), array('onclick' => "TBG.Issues.Add('" . make_url('get_partial_for_backdrop', array('key' => 'reportissue', 'project_id' => framework\Context::getCurrentProject()->getId())) . "');", 'class' => 'button button-lightblue', 'id' => 'reportissue_button'));
    ?>
        </div>
    <?php 
}
framework\Event::createNew('core', 'before_header_userinfo')->trigger();
?>
</nav>
开发者ID:shoreless-Limited,项目名称:thebuggenie,代码行数:30,代码来源:headermainmenu.inc.php

示例5: listen_sidebar_links

 public function listen_sidebar_links(framework\Event $event)
 {
     if (framework\Context::isProjectContext()) {
         include_component('vcs_integration/menustriplinks', array('project' => framework\Context::getCurrentProject(), 'module' => $this, 'submenu' => $event->getParameter('submenu')));
     }
 }
开发者ID:AzerothShard,项目名称:thebuggenie,代码行数:6,代码来源:Vcs_integration.php

示例6: __construct

 /**
  * Setup the parser object
  *
  * @param string $text The text to be parsed
  * @param boolean $use_toc [optional] Whether to use a TOC if found
  * @param string $toc_base_id [optional] Base id to use for the TOC element
  */
 public function __construct($text, $use_toc = false, $toc_base_id = null)
 {
     $this->text = str_replace("\r\n", "\n", $text);
     $this->use_toc = $use_toc;
     $this->toc_base_id = $toc_base_id;
     if (framework\Context::isProjectContext()) {
         $this->namespace = framework\Context::getCurrentProject()->getKey();
     }
     if (!framework\Context::isCLI()) {
         framework\Context::loadLibrary('ui');
     }
 }
开发者ID:underblaze,项目名称:thebuggenie-4.1.0,代码行数:19,代码来源:TextParser.php

示例7: headerMenuProjectLinks

 /**
  * Header "Agile" menu and board list
  *
  * @Listener(module="core", identifier="templates/headermainmenu::projectmenulinks")
  *
  * @param \thebuggenie\core\framework\Event $event
  */
 public function headerMenuProjectLinks(framework\Event $event)
 {
     if (framework\Context::isProjectContext()) {
         $boards = \thebuggenie\modules\agile\entities\AgileBoard::getB2DBTable()->getAvailableProjectBoards(framework\Context::getUser()->getID(), framework\Context::getCurrentProject()->getID());
         framework\ActionComponent::includeComponent('agile/headermenuprojectlinks', array('project' => $event->getSubject(), 'boards' => $boards));
     }
 }
开发者ID:shoreless-Limited,项目名称:thebuggenie,代码行数:14,代码来源:Agile.php

示例8: array

                                <input type="checkbox" name="update_issue[<?php 
            echo $issue->getID();
            ?>
]" value="<?php 
            echo $issue->getID();
            ?>
">
                            <?php 
        }
        ?>
                        </td>
                    <?php 
    }
    ?>
                <?php 
    if (!\thebuggenie\core\framework\Context::isProjectContext() && $show_project == true) {
        ?>
                    <td style="padding-left: 5px;"><?php 
        echo link_tag(make_url('project_issues', array('project_key' => $issue->getProject()->getKey())), $issue->getProject()->getName());
        ?>
</td>
                <?php 
    }
    ?>
                    <td class="sc_issuetype"<?php 
    if (!in_array('issuetype', $visible_columns)) {
        ?>
 style="display: none;"<?php 
    }
    ?>
>
开发者ID:nrensen,项目名称:thebuggenie,代码行数:31,代码来源:_results_normal.inc.php

示例9: componentExtralinks

 public function componentExtralinks()
 {
     switch (true) {
         case framework\Context::getRequest()->hasParameter('quicksearch'):
             $searchfor = framework\Context::getRequest()->getParameter('searchfor');
             $project_key = framework\Context::getCurrentProject() instanceof entities\Project ? framework\Context::getCurrentProject()->getKey() : 0;
             $this->csv_url = framework\Context::getRouting()->generate('project_issues', array('project_key' => $project_key, 'quicksearch' => 'true', 'format' => 'csv')) . '?searchfor=' . $searchfor;
             $this->rss_url = framework\Context::getRouting()->generate('project_issues', array('project_key' => $project_key, 'quicksearch' => 'true', 'format' => 'rss')) . '?searchfor=' . $searchfor;
             break;
         case framework\Context::getRequest()->hasParameter('predefined_search'):
             $searchno = framework\Context::getRequest()->getParameter('predefined_search');
             $project_key = framework\Context::getCurrentProject() instanceof entities\Project ? framework\Context::getCurrentProject()->getKey() : 0;
             $url = framework\Context::getCurrentProject() instanceof entities\Project ? 'project_issues' : 'search';
             $this->csv_url = framework\Context::getRouting()->generate($url, array('project_key' => $project_key, 'predefined_search' => $searchno, 'search' => '1', 'format' => 'csv'));
             $this->rss_url = framework\Context::getRouting()->generate($url, array('project_key' => $project_key, 'predefined_search' => $searchno, 'search' => '1', 'format' => 'rss'));
             break;
         default:
             preg_match('/((?<=\\/)issues).+$/i', framework\Context::getRequest()->getQueryString(), $get);
             if (!isset($get[0])) {
                 preg_match('/((?<=url=)issues).+$/i', framework\Context::getRequest()->getQueryString(), $get);
             }
             if (isset($get[0])) {
                 if (framework\Context::isProjectContext()) {
                     $this->csv_url = framework\Context::getRouting()->generate('project_issues', array('project_key' => framework\Context::getCurrentProject()->getKey(), 'format' => 'csv')) . '/' . $get[0];
                     $this->rss_url = framework\Context::getRouting()->generate('project_issues', array('project_key' => framework\Context::getCurrentProject()->getKey(), 'format' => 'rss')) . '?' . $get[0];
                 } else {
                     $this->csv_url = framework\Context::getRouting()->generate('search', array('format' => 'csv')) . '/' . $get[0];
                     $this->rss_url = framework\Context::getRouting()->generate('search', array('format' => 'rss')) . '?' . $get[0];
                 }
             }
             break;
     }
     $i18n = framework\Context::getI18n();
     $this->columns = array('title' => $i18n->__('Issue title'), 'issuetype' => $i18n->__('Issue type'), 'assigned_to' => $i18n->__('Assigned to'), 'status' => $i18n->__('Status'), 'resolution' => $i18n->__('Resolution'), 'category' => $i18n->__('Category'), 'severity' => $i18n->__('Severity'), 'percent_complete' => $i18n->__('% completed'), 'reproducability' => $i18n->__('Reproducability'), 'priority' => $i18n->__('Priority'), 'components' => $i18n->__('Component(s)'), 'milestone' => $i18n->__('Milestone'), 'estimated_time' => $i18n->__('Estimate'), 'spent_time' => $i18n->__('Time spent'), 'last_updated' => $i18n->__('Last updated time'), 'comments' => $i18n->__('Number of comments'));
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:35,代码来源:Components.php

示例10: extractIssues

 public function extractIssues($matches)
 {
     $issue = entities\Issue::getIssueFromLink($matches["issues"]);
     if ($issue instanceof entities\Issue) {
         if (!framework\Context::isProjectContext() || framework\Context::isProjectContext() && $issue->getProjectID() == framework\Context::getCurrentProject()->getID()) {
             $this->foundissues[$issue->getID()] = $issue;
             $this->resultcount++;
         }
     }
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:10,代码来源:Actions.php

示例11: __

                                </div>
                            </div>
                        </div>
                        <?php 
        if ($a_savedsearch->getDescription() != '') {
            ?>
                            <div style="clear: both; padding: 0 0 10px 3px;"><?php 
            echo $a_savedsearch->getDescription();
            ?>
</div>
                        <?php 
        }
        ?>
                    </li>
                <?php 
    }
    ?>
            <?php 
} else {
    ?>
                <li class="no_items" style="font-size: 1em;" id="no_public_saved_searches"><?php 
    echo \thebuggenie\core\framework\Context::isProjectContext() ? __("There are no saved searches for this project") : __("There are no public saved searches");
    ?>
</li>
            <?php 
}
?>
        </ul>
    </div>
</td>
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:30,代码来源:_sidebar.inc.php

示例12: foreach

][<?php 
        echo $key;
        ?>
][value]" id="filter_<?php 
        echo $filter;
        ?>
_<?php 
        echo $key;
        ?>
">
                <option value="0"> - </option>
                <?php 
        foreach ($filters[$filter]['options'] as $item) {
            ?>
                    <?php 
            if (method_exists($item, 'getProject') && (\thebuggenie\core\framework\Context::isProjectContext() && $item->getProject()->getID() != \thebuggenie\core\framework\Context::getCurrentProject()->getID() || !\thebuggenie\core\framework\Context::isProjectContext())) {
                ?>
                        <option value="<?php 
                echo $item->getID();
                ?>
"<?php 
                if ($selected_value == $item->getID()) {
                    ?>
 selected<?php 
                }
                ?>
><?php 
                echo $item->getProject()->getName() . '&nbsp;&ndash;&nbsp;' . $item->getName();
                ?>
</option>
                    <?php 
开发者ID:founderio,项目名称:thebuggenie,代码行数:31,代码来源:_filter.inc.php

示例13: in_array

<?php

$children = $main_article->getChildArticles();
$is_parent = in_array($main_article->getID(), $parents);
$is_selected = $main_article->getID() == $article->getID() || $main_article->isRedirect() && $main_article->getRedirectArticleName() == $article->getTitle();
$is_first = $first;
$first = false;
$project_key = \thebuggenie\core\framework\Context::isProjectContext() ? \thebuggenie\core\framework\Context::getCurrentProject()->getKey() . ':' : '';
//    $article_name = (strpos(mb_strtolower($main_article->getTitle()), 'category:') !== false) ? substr($main_article->getTitle(), 9+mb_strlen($project_key)) : substr($main_article->getTitle(), mb_strlen($project_key));
?>
<li class="<?php 
echo isset($level) && $level >= 1 ? 'child' : 'parent';
?>
 <?php 
if ($is_parent && !$is_selected) {
    echo 'parent';
}
?>
 <?php 
if ($is_selected) {
    echo 'selected';
}
?>
 level_<?php 
echo $level;
?>
" id="article_sidebar_link_<?php 
echo $article->getID();
?>
">
    <?php 
开发者ID:nrensen,项目名称:thebuggenie,代码行数:31,代码来源:_manualsidebarlink.inc.php

示例14: componentLeftmenu

 public function componentLeftmenu()
 {
     $this->show_article_options = (bool) ($this->article instanceof Article);
     $this->links_target_id = framework\Context::isProjectContext() ? framework\Context::getCurrentProject()->getID() : 0;
     $this->links = framework\Context::getModule('publish')->getMenuItems($this->links_target_id);
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:6,代码来源:Components.php

示例15: __

    <ShortName><?php 
echo \thebuggenie\core\framework\Context::isProjectContext() ? __('%project_name search', array('%project_name' => \thebuggenie\core\framework\Context::getCurrentProject()->getName())) : __('%site_name search', array('%site_name' => \thebuggenie\core\framework\Settings::getSiteHeaderName()));
?>
</ShortName>
    <LongName><?php 
echo \thebuggenie\core\framework\Context::isProjectContext() ? __('%project_name search', array('%project_name' => \thebuggenie\core\framework\Context::getCurrentProject()->getName())) : __('%site_name search', array('%site_name' => \thebuggenie\core\framework\Settings::getSiteHeaderName()));
?>
</LongName>
    <Description><?php 
echo \thebuggenie\core\framework\Context::isProjectContext() ? __('%project_name search', array('%project_name' => \thebuggenie\core\framework\Context::getCurrentProject()->getName())) : __('%site_name search', array('%site_name' => \thebuggenie\core\framework\Settings::getSiteHeaderName()));
?>
</Description>
    <Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAIgAAACIBB7P0uQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKISURBVDiNpZNPiE1xFMc%2F5%2F7ufX%2B853nzZh6G%2BYPBaESDovxPilKabEhZsJOFLBRjITuFiAULkqRYsLAxooiEGAzR%2BPcmRmP8mWnejDf3vXfvu8fmjaiRhbM5ncX5dL6n71dUlf8p%2B%2FehslIS8cnsTFRS7%2FuUst94le3mTi6nT%2F8JmFgv06Yv42Zjc3pqQ%2FUikukw99tv8LZj0E1OkmMDPdo6GsACEJFQopozk2Yyta7JZt2aDbif6tm19ShzlkWiTYvZm0zL7r8CQlFaYklWhmNQ1M8MeZ1s2bSNh239LF64lJomqJnDAceRFaMCii4NhWHwCqDAs54T9FlX0bGv6Xj%2BmHQdjK8jWlHNcRGpEBH5BRCRFOBlv8BALwwPQXbI5dabVqzG03TcHSA%2FBJGxEK9iLrAf2CcizSNPXOc4TktvxuscN4FZ8RTYIfB9sG2YvxYuH4aqGiAAYDmQBw4B2Kp6XkR6ReRs1xP1bAfHL0B6CsTGQSEPue9hd%2Fa0RWKnXtrFxr7Zve%2FMtVKp5IhIkbKRDDADOBaK0N2wAF3Ygi7dTBCvsPpOXWjVN59v65Hr03XHGYJYwr4CbATMiA8U6AcuFfN0vW9nfXcnlV6e2rmrgtTX6EXaug5ixgREoogJ%2BV40Gl3iuu5lG0BVAxH5AfQBMcAr5qg1xoQsUyLTlaHjFNnBTH3MC3%2FoH%2FyOgjsfaEZVR2RsB9oSicRJYDNw1hhzXyxexFN8C0dsf8%2B5ZH7eatqADUAjYOT3MImIKV%2BQBmqBfZZleUEQ3AMmWDY%2FAp%2FXwAMgo6reH2FS1VJZig8MA4%2BMMZkgCLoBO%2FDJAT3AR1X1AGS0OJedZgMOECl3gAKQA3wtL%2F4EbzL%2FhCjT%2FIEAAAAASUVORK5CYII%3D</Image>
    <Url type="text/html" template="<?php 
echo \thebuggenie\core\framework\Context::isProjectContext() ? make_url('project_issues', array('project_key' => \thebuggenie\core\framework\Context::getCurrentProject()->getKey()), false) : make_url('search', array(), false);
?>
?fs[text][o]=%3A&amp;fs[text][v]={searchTerms}"/>
    <Url type="application/x-suggestions+json" template="<?php 
echo \thebuggenie\core\framework\Context::isProjectContext() ? make_url('project_quicksearch', array('project_key' => \thebuggenie\core\framework\Context::getCurrentProject()->getKey(), 'format' => 'json'), false) : make_url('quicksearch', array('format' => 'json'), false);
?>
?fs[text][o]=%3A&amp;fs[text][v]={searchTerms}"/>
    <AdultContent>false</AdultContent>
    <OutputEncoding><?php 
echo \thebuggenie\core\framework\Context::getI18n()->getCharset();
?>
</OutputEncoding>
    <Contact>support@thebuggenie.com</Contact>
    <Query role="example" searchTerms="opensearch"/>
    <Attribution>No copyright</Attribution>
    <SyndicationRight>open</SyndicationRight>
</OpenSearchDescription>
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:31,代码来源:opensearch.xml.php


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