當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。