Ejemplo n.º 1
0
 public function buildCondition(PlFilter $uf)
 {
     /** Tables shortcuts:
      * pc for profile_corps,
      * pceo for profile_corps_enum - orginal
      * pcec for profile_corps_enum - current
      */
     $sub = $uf->addCorpsFilter($this->type);
     if (is_null($this->id)) {
         $cond = $sub . '.abbreviation = ' . $this->corps;
     } else {
         $cond = $sub . '.id = ' . $this->id;
     }
     // XXX(x2006barrois): find a way to get rid of that hardcoded
     // reference to 'pc'.
     $cond .= ' AND ' . $uf->getVisibilityConditionForField('pc.corps_pub');
     return $cond;
 }