/** * Create a new sale location entry * * @param \SalesLocations\Event\SalesLocationsCreateOrUpdateEvent $event */ public function create(SalesLocationsCreateOrUpdateEvent $event) { $saleLocation = new SalesLocationsModel(); $saleLocation->setDispatcher($event->getDispatcher())->setCompany($event->getCompany())->setFirstname($event->getFirstname())->setLastname($event->getLastname())->setAddress1($event->getAddress1())->setAddress2($event->getAddress2())->setAddress3($event->getAddress3())->setZipcode($event->getZipcode())->setCity($event->getCity())->setCountryId($event->getCountry())->setPhone($event->getPhone())->setCellphone($event->getCellphone())->setVisible($event->getVisible())->save(); $event->setSaleLocation($saleLocation); }
/** * Exclude object from result * * @param ChildSalesLocations $salesLocations Object to remove from the list of results * * @return ChildSalesLocationsQuery The current query, for fluid interface */ public function prune($salesLocations = null) { if ($salesLocations) { $this->addUsingAlias(SalesLocationsTableMap::ID, $salesLocations->getId(), Criteria::NOT_EQUAL); } return $this; }