Ejemplo n.º 1
0
 public function set()
 {
     $form = new \Colissimo\Form\FreeShipping($this->getRequest());
     $response = null;
     try {
         $vform = $this->validateForm($form);
         $data = $vform->get('freeshipping')->getData();
         $save = new ColissimoFreeshipping();
         $save->setActive(!empty($data))->save();
         $response = Response::create('');
     } catch (\Exception $e) {
         $response = JsonResponse::create(array("error" => $e->getMessage()), 500);
     }
     return $response;
 }
 /**
  * Exclude object from result
  *
  * @param   ChildColissimoFreeshipping $colissimoFreeshipping Object to remove from the list of results
  *
  * @return ChildColissimoFreeshippingQuery The current query, for fluid interface
  */
 public function prune($colissimoFreeshipping = null)
 {
     if ($colissimoFreeshipping) {
         $this->addUsingAlias(ColissimoFreeshippingTableMap::ID, $colissimoFreeshipping->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }