我目前正在爲prestashop開發一個模塊,但我無法找到關於數據庫中數據註冊的信息。你有什麼想法如何做到這一點?模塊prestashop
我開始喜歡這個在我的控制器創建自己的狀態:
/**
* Assign template vars related to page content
* @see FrontController::initContent()
*/
public function initContent()
{
parent::initContent();
$this->setTemplate('upload.tpl');
}
public function renderForm()
{
$fields_form = array(
'form' => array(
'input' => array(
array(
'type' => 'file',
'label' => $this->l('Insert file here.'),
'name' => 'FILE_NAME',
'required' => true
),
),
'submit' => array(
'title' => $this->l('Save'),
)
),
);
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->table = $this->table;
$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
$helper->default_form_language = 1;
$helper->fields_value['FILE_NAME'] = "";
$this->fields_form = array();
$helper->submit_action = 'btnSubmit';
return $helper->generateForm(array($fields_form));
}
謝謝