本文整理匯總了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')));
}
示例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
}
示例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
}
示例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>