Ejemplo n.º 1
0
 public function saveUserFilterMissionTypesList($con = null)
 {
     if (!$this->isValid()) {
         throw $this->getErrorSchema();
     }
     if (!isset($this->widgetSchema['user_filter_mission_types_list'])) {
         // somebody has unset this widget
         return;
     }
     if (is_null($con)) {
         $con = $this->getConnection();
     }
     $c = new Criteria();
     $c->add(UserFilterMissionTypesPeer::USER_FILTER_ID, $this->object->getPrimaryKey());
     UserFilterMissionTypesPeer::doDelete($c, $con);
     $values = $this->getValue('user_filter_mission_types_list');
     if (is_array($values)) {
         foreach ($values as $value) {
             $obj = new UserFilterMissionTypes();
             $obj->setUserFilterId($this->object->getPrimaryKey());
             $obj->setMissionTypeId($value);
             $obj->save();
         }
     }
 }