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


PHP Company::getActiveProjects方法代码示例

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


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

示例1: action_index

 public function action_index()
 {
     $session = Session::instance();
     //print_r(Company::checkIfApproved($session->get('userId')));
     //print_r($session);
     $projects = array();
     $projects = MyDB::getCompletedProjects();
     if ($session->get('userType') == 'student') {
         $projects = User::getActiveProjects($session->get('userId'));
     }
     if ($session->get('userType') == 'company') {
         $projects = Company::getActiveProjects($session->get('userId'));
     }
     $this->response->body(View::factory('header') . View::factory('welcome')->set('projects', $projects)->set('userType', $session->get('userType')));
 }
开发者ID:JovanRis,项目名称:Demola2,代码行数:15,代码来源:Welcome.php

示例2: getTodayMilestonesByCompany

 /**
  * Return milestones scheduled for today from projects related with specific company
  *
  * @param Company $company
  * @return array
  */
 function getTodayMilestonesByCompany(Company $company)
 {
     $from_date = DateTimeValueLib::now()->beginningOfDay();
     $to_date = DateTimeValueLib::now()->endOfDay();
     $projects = $company->getActiveProjects();
     if (!is_array($projects) || !count($projects)) {
         return null;
     }
     $project_ids = array();
     foreach ($projects as $project) {
         $project_ids[] = $project->getId();
     }
     // foreach
     return self::findAll(array('conditions' => array('`completed_on` = ? AND (`due_date` >= ? AND `due_date` < ?) AND `project_id` IN (?)', EMPTY_DATETIME, $from_date, $to_date, $project_ids), 'order' => '`due_date`'));
     // findAll
 }
开发者ID:federosky,项目名称:ProjectPier-Core,代码行数:22,代码来源:ProjectMilestones.class.php

示例3: getTodayMilestonesByCompany

 /**
  * Return milestones scheduled for today from projects related with specific company
  *
  * @param Company $company
  * @return array
  */
 function getTodayMilestonesByCompany(Company $company, $archived = false)
 {
     $from_date = DateTimeValueLib::now()->beginningOfDay();
     $to_date = DateTimeValueLib::now()->endOfDay();
     $projects = $company->getActiveProjects();
     if (!is_array($projects) || !count($projects)) {
         return null;
     }
     $project_ids = array();
     foreach ($projects as $project) {
         $project_ids[] = $project->getId();
     }
     // foreach
     if ($archived) {
         $archived_cond = "`archived_by_id` <> 0 AND ";
     } else {
         $archived_cond = "`archived_by_id` = 0 AND ";
     }
     return self::findAll(array('conditions' => array('`is_template` = false AND `completed_on` = ? AND (`due_date` >= ? AND `due_date` < ?) AND ' . $archived_cond . self::getWorkspaceString($project_ids), EMPTY_DATETIME, $from_date, $to_date), 'order' => '`due_date`'));
     // findAll
 }
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:27,代码来源:ProjectMilestones.class.php

示例4: Company

                echo "<div class='panel-footer' >" . $comment['Comment'] . " " . $comment['Date_Created'] . "</div>";
            }
            ?>
                    </div>
                    
                </div>
                <?php 
        }
        ?>
            </div>
            <?php 
    }
    if ($_SESSION['userType'] == 'company') {
        require_once "classes/companyClass.php";
        $companyObj = new Company();
        $projects = $companyObj->getActiveProjects($_SESSION['companyID']);
        ?>
 
            <div class="container">
            <?php 
        foreach ($projects as $project) {
            ?>
                <div>
                    <div class="container text-left"><h3><?php 
            echo $project['ProjectName'];
            ?>
</h3></div>
                    <div class="container text-left"><p><?php 
            echo $project['Discription'];
            ?>
</p></div>
开发者ID:JovanRis,项目名称:fiktApp,代码行数:31,代码来源:index.php


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