public function getContent() { $id_info = (int) Tools::getValue('id_info'); if (Tools::isSubmit('saveblockcmsinfo')) { if (!Tools::getValue('text_' . (int) Configuration::get('PS_LANG_DEFAULT'), false)) { return $this->html . $this->displayError($this->l('You must fill in all fields.')) . $this->renderForm(); } elseif ($this->processSaveCmsInfo()) { return $this->html . $this->renderList(); } else { return $this->html . $this->renderForm(); } } elseif (Tools::isSubmit('updateblockcmsinfo') || Tools::isSubmit('addblockcmsinfo')) { $this->html .= $this->renderForm(); return $this->html; } else { if (Tools::isSubmit('deleteblockcmsinfo')) { $info = new InfoBlock((int) $id_info); $info->delete(); $this->_clearCache('blockcmsinfo.tpl'); Tools::redirectAdmin(AdminController::$currentIndex . '&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')); } else { $this->html .= $this->renderList(); return $this->html; } } }
public function getContent() { $id_info = (int) Tools::getValue('id_info'); if (Tools::isSubmit('saveblockcmsinfo')) { if ($this->processSaveCmsInfo()) { return $this->html . $this->renderList(); } else { return $this->html . $this->renderForm(); } } elseif (Tools::isSubmit('updateblockcmsinfo') || Tools::isSubmit('addblockcmsinfo')) { $this->html .= $this->renderForm(); return $this->html; } else { if (Tools::isSubmit('deleteblockcmsinfo')) { $info = new InfoBlock((int) $id_info); $info->delete(); $this->_clearCache('blockcmsinfo.tpl'); Tools::redirectAdmin(AdminController::$currentIndex . '&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')); } else { $this->html .= $this->renderList(); return $this->html; } } }