/** * Add location for the content from POST data * @param $iId content id * @param $sPrefix field prefix for POST data, or empty - if no prefix * @param $oForm form to use to get POST data, or null - then new form instance will be created */ public function locationsAddFromForm($iId, $sPrefix = '', $oForm = null) { if (!$this->locationsIsEnabled()) { return; } if ($sPrefix) { $sPrefix .= '_'; } if (!$oForm) { $oForm = new BxDolForm(array(), false); } $this->locationsAdd($iId, $oForm->getCleanValue($sPrefix . 'lat'), $oForm->getCleanValue($sPrefix . 'lng'), $oForm->getCleanValue($sPrefix . 'country'), $oForm->getCleanValue($sPrefix . 'state'), $oForm->getCleanValue($sPrefix . 'city'), $oForm->getCleanValue($sPrefix . 'zip')); }
public function locationsAddFromForm($iId, $sName, $oForm = null) { if (!$oForm) { $oForm = new BxDolForm(array(), false); } $this->locationsAdd($iId, $oForm->getCleanValue($sName . '_lat'), $oForm->getCleanValue($sName . '_lng'), $oForm->getCleanValue($sName . '_country'), $oForm->getCleanValue($sName . '_state'), $oForm->getCleanValue($sName . '_city'), $oForm->getCleanValue($sName . '_zip')); }