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


PHP Plan::getFilter方法代码示例

本文整理汇总了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";
         }
     }
 }
开发者ID:alexloic,项目名称:abime,代码行数:57,代码来源:ControleurCRUD.php

示例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);
     }
 }
开发者ID:alexloic,项目名称:abime,代码行数:12,代码来源:ControleurPlanAnnotator.php


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