Ejemplo n.º 1
0
 public function __construct(UserFilterBuilder $ufb, PlFilterCondition $cond = null)
 {
     if (is_null($cond)) {
         $conds = new PFC_And();
     } else {
         if ($cond instanceof PFC_And) {
             $conds = $cond;
         } else {
             $conds = new PFC_And($cond);
         }
     }
     if (!$ufb->isValid()) {
         $this->valid = false;
         return;
     }
     $ufc = $ufb->getUFC();
     $conds->addChild($ufc);
     $orders = $ufb->getOrders();
     parent::__construct($conds, $orders);
 }
Ejemplo n.º 2
0
 protected function buildUFC(UserFilterBuilder $ufb)
 {
     if ($ufb->isOn($this->onlymentorfield)) {
         return new UFC_Mentor_Expertise($this->val);
     } else {
         return new UFC_Job_Description($this->val, UserFilter::JOB_CV);
     }
 }