本文整理汇总了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>