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


PHP Project::getProjectsCount方法代码示例

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


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

示例1: hasProjectsAvailable

 public function hasProjectsAvailable()
 {
     return $this->getMaxProjects() ? Project::getProjectsCount() < $this->getMaxProjects() : true;
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:4,代码来源:Scope.php

示例2: runDeleteProject

 /**
  * Delete a project
  *
  * @param framework\Request $request The request object
  */
 public function runDeleteProject(framework\Request $request)
 {
     $i18n = framework\Context::getI18n();
     if ($this->access_level == framework\Settings::ACCESS_FULL) {
         try {
             $theProject = entities\Project::getB2DBTable()->selectByID($request['project_id']);
             $theProject->setDeleted();
             $theProject->save();
             return $this->renderJSON(array('title' => $i18n->__('The project was deleted'), 'total_count' => entities\Project::getProjectsCount(), 'more_available' => framework\Context::getScope()->hasProjectsAvailable()));
         } catch (\Exception $e) {
             $this->getResponse()->setHttpStatus(400);
             return $this->renderJSON(array('error' => $i18n->__('An error occured') . ': ' . $e->getMessage()));
         }
     }
     $this->getResponse()->setHttpStatus(400);
     return $this->renderJSON(array("error" => $i18n->__("You don't have access to remove projects")));
 }
开发者ID:nrensen,项目名称:thebuggenie,代码行数:22,代码来源:Main.php

示例3: __

            <div style="width: 730px;">
                <h3><?php 
echo __('Configure projects');
?>
</h3>
                <div class="content faded_out">
                    <p>
                        <?php 
echo __('More information about projects, editions, builds and components is available from the %wiki_help_section.', array('%wiki_help_section' => link_tag(make_url('publish_article', array('article_name' => 'Category:Help')), '<b>' . __('Wiki help section') . '</b>')));
?>
                        <?php 
if (\thebuggenie\core\framework\Context::getScope()->getMaxProjects()) {
    ?>
                            <div class="faded_out dark" style="margin: 12px 0;">
                                <?php 
    echo __('This instance is using %num of max %max projects', array('%num' => '<b id="current_project_num_count">' . \thebuggenie\core\entities\Project::getProjectsCount() . '</b>', '%max' => '<b>' . \thebuggenie\core\framework\Context::getScope()->getMaxProjects() . '</b>'));
    ?>
                            </div>
                        <?php 
}
?>
                    </p>
                </div>
                <?php 
if ($access_level == \thebuggenie\core\framework\Settings::ACCESS_FULL) {
    ?>
                    <div class="lightyellowbox" style="padding: 5px; margin: 10px 0;<?php 
    if (!\thebuggenie\core\framework\Context::getScope()->hasProjectsAvailable()) {
        ?>
 display: none;<?php 
    }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:31,代码来源:configureprojects.html.php


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