本文整理汇总了PHP中WishList::getCustomers方法的典型用法代码示例。如果您正苦于以下问题:PHP WishList::getCustomers方法的具体用法?PHP WishList::getCustomers怎么用?PHP WishList::getCustomers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WishList
的用法示例。
在下文中一共展示了WishList::getCustomers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderForm
public function renderForm()
{
$_customers = WishList::getCustomers();
foreach ($_customers as $c) {
$_customers[$c['id_customer']]['id_customer'] = $c['id_customer'];
$_customers[$c['id_customer']]['name'] = $c['firstname'] . ' ' . $c['lastname'];
}
$fields_form = array('form' => array('legend' => array('title' => $this->l('Listing'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'select', 'label' => $this->l('Customers :'), 'name' => 'id_customer', 'options' => array('default' => array('value' => 0, 'label' => $this->l('Choose customer')), 'query' => $_customers, 'id' => 'id_customer', 'name' => 'name')))));
if ($id_customer = Tools::getValue('id_customer')) {
$wishlists = WishList::getByIdCustomer($id_customer);
$fields_form['form']['input'][] = array('type' => 'select', 'label' => $this->l('Wishlist :'), 'name' => 'id_wishlist', 'options' => array('default' => array('value' => 0, 'label' => $this->l('Choose wishlist')), 'query' => $wishlists, 'id' => 'id_wishlist', 'name' => 'name'));
}
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->table = $this->table;
$lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
$helper->default_form_language = $lang->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
$helper->identifier = $this->identifier;
$helper->submit_action = 'submitModule';
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
return $helper->generateForm(array($fields_form));
}