/** * Add new fieldBupBup for children table (@see class field) * @param string $name name of a field * @param string $html html type of field (text, textarea, etc. @see html class) * @param string $type database type (int, varcahr, etc.) * @param mixed $default default value for this field * @return object $this - pointer to current object */ protected function _addField($name, $html = 'text', $type = 'other', $default = '', $label = '', $maxlen = 0, $dbAdapt = '', $htmlAdapt = '', $description = '') { $this->_fields[$name] = toeCreateObjBup('fieldBup', array($name, $html, $type, $default, $label, $maxlen, $dbAdapt, $htmlAdapt, $description)); return $this; }
public function __construct() { $this->_res = toeCreateObjBup('response', array()); }
public function saveLogoImg($d = array()) { if (!empty($d) && isset($d['logo_image']) && !empty($d['logo_image'])) { $uploader = toeCreateObjBup('fileuploader', array()); if ($uploader->validate('logo_image', frameBup::_()->getModule('options')->getLogoImgDir()) && $uploader->upload()) { // Remove prev. image utilsBup::deleteFile(frameBup::_()->getModule('options')->getLogoImgFullDir()); $fileInfo = $uploader->getFileInfo(); // Save info for this option $this->save(array('code' => 'logo_image', 'opt_values' => array('logo_image' => $fileInfo['path']))); return true; } else { $this->pushError($uploader->getError()); } } else { $this->pushError(__('Empty data to setup', BUP_LANG_CODE)); } return false; }