本文整理匯總了PHP中Plan::getFilter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Plan::getFilter方法的具體用法?PHP Plan::getFilter怎麽用?PHP Plan::getFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Plan
的用法示例。
在下文中一共展示了Plan::getFilter方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionDisplayNextTable
public static function actionDisplayNextTable()
{
if (isset($_GET['t']) && $_GET['t']) {
$table = $_GET['t'];
$filter = array();
if (isset($_GET['s']) && $_GET['s'] && $_GET['s'] != null && $_GET['s'] != 'null') {
$search = $_GET['s'];
} else {
$search = null;
}
if (isset($_GET['i']) && $_GET['i']) {
$currentEntityId = $_GET['i'];
} else {
$currentEntityId = null;
}
if ($table == 'customers' && ControleurRights::canAddCustomer()) {
if ($search != null) {
$filter[] = Customer::getFilter(CustomerColumns::last_name, $search);
}
return ControleurCRUD::getNextTable('Customer', $currentEntityId, CustomerColumns::last_name, $filter, false);
} elseif ($table == 'team_member' && ControleurRights::canAddTeamMember()) {
$team = ControleurCRUD::getNextTable('TeamMember', $currentEntityId, TeamMemberColumns::id, $filter, false);
return ControleurAdministration::actionDisplayNextTableTeamMember($team);
} elseif ($table == 'users' && ControleurRights::canAddUser()) {
if ($search != null) {
$filter[] = User::getFilter(UserColumns::last_name, $search);
}
$users = ControleurCRUD::getNextTable('User', $currentEntityId, UserColumns::last_name, $filter, false);
if (count($users) > 0) {
foreach ($users as $user) {
$user->setPicture();
}
}
return $users;
} elseif ($table == 'projects' && ControleurRights::canDisplayProjects()) {
if ($search != null) {
$filter[] = User::getFilter(ProjectColumns::name, $search);
}
return ControleurCRUD::getNextTable('Project', $currentEntityId, ProjectColumns::created_timestamp, $filter, true);
} elseif ($table == 'plans' && ControleurRights::canDisplayPlans()) {
if ($search != null) {
$filter[] = User::getFilter(ProjectColumns::name, $search);
}
if (isset($_GET['p']) && $_GET['p']) {
$filter[] = Plan::getFilter(PlanColumns::id_project, $_GET['p']);
}
return ControleurCRUD::getNextTable('Plan', $currentEntityId, PlanColumns::created_timestamp, $filter, true);
} elseif ($table == 'skills' && ControleurRights::canAddSkills()) {
if ($search != null) {
$filter[] = User::getFilter(SkillColumns::name, $search);
}
return ControleurCRUD::getNextTable('Skill', $currentEntityId, SkillColumns::name, $filter, true);
} else {
return "Table " . $table . " non configurée dans le CRUD ou interdiction d'accès à l'utilisateur";
}
}
}
示例2: actionDisplayNextPlans
public function actionDisplayNextPlans()
{
if (isset($_GET['p']) && $_GET['p'] && isset($_GET['i']) && $_GET['i'] && ControleurRights::canDisplayPlans()) {
$id_plan = $_GET['p'];
$plan = new Plan();
$plan->setId($id_plan);
$order[] = Plan::getSorter(PlanColumns::created_timestamp, true);
$filter[] = Plan::getFilter(PlanColumns::id_project, $_GET['i']);
$from = $plan->getEntityPosition(array(), $order);
return Plan::getEntitySet($filter, $order, $from, $from + $this::PLANS_NUMBER);
}
}