public function save() { $file = $this->getElement("company_logo"); parent::save(); if ($file->fileSent()) { $file->setDestination(Wpjb_List_Path::getPath("company_logo")); $file->upload("logo_" . $this->getObject()->getId() . "." . $file->getExt()); } }
public function save() { $image = null; if ($this->hasElement("image")) { $image = $this->getElement("image"); } $file = null; if ($this->hasElement("file")) { $file = $this->getElement("file"); } $valueList = $this->getValues(); parent::save(); $this->_saveAdditionalFields($valueList); if ($image && $image->fileSent()) { $image->setDestination(Wpjb_List_Path::getPath("resume_photo")); $image->upload("photo_" . $this->getObject()->getId() . "." . $image->getExt()); } if ($file && $file->fileSent()) { $file->setDestination(Wpjb_List_Path::getPath("resume_photo")); $file->upload("file_" . $this->getObject()->getId() . "." . $file->getExt()); } apply_filters("wpja_form_save_resume", $this); $this->reinit(); }