public static function add($smtm, $smt, $smName, $smEnabled) { $sm = new self(); $sm->setShippingMethodTypeMethodID($smtm); $sm->setShippingMethodTypeID($smt); $sm->setName($smName); $sm->setEnabled($smEnabled); $sm->save(); $smtm->setShippingMethodID($sm->getShippingMethodID()); $smtm->save(); return $sm; }