如何在prestashop中使用HelperList

How to use HelperList in prestashop

Prestashop 中的学习编写模块。我需要使用 HelperList,但有问题。用HelperForm都可以。

public function displayList()
{

         $this->fields_list = array(
            'id_email' => array(
                'title' => $this->l('id_email'),
                'width' => 140,
                'type' => 'int',
            ),
            'email' => array(
                'title' => $this->l('email'),
                'width' => 140,
                'type' => 'text',
            ),
        );

        $helper = new HelperList();

        $helper->shopLinkType = '';

        $helper->simple_header = false;

        $helper->actions = array('edit', 'delete', 'view');

        $helper->identifier = 'id_email';
        $helper->show_toolbar = true;
        $helper->title = 'HelperList';
        $helper->table =_DB_PREFIX_.$this->name;

        $helper->token = Tools::getAdminTokenLite('AdminModules');
        $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
        return $helper;
}

并且当我在 getcontent 中写入 return $this->displayList(); 时,我的页面是空的。 我做错了什么?

public function displayList() { //$results = array(some_data) !!!return $helper->generateList($results,$fields_list);