本文整理汇总了PHP中AdminController::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminController::getList方法的具体用法?PHP AdminController::getList怎么用?PHP AdminController::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminController
的用法示例。
在下文中一共展示了AdminController::getList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getList
/**
* Modifying initial getList method to display position feature (drag and drop)
*/
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
if ($order_by && $this->context->cookie->__get($this->table . 'Orderby')) {
$order_by = $this->context->cookie->__get($this->table . 'Orderby');
} else {
$order_by = 'position';
}
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
}
示例2: getList
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
if ($this->_list && is_array($this->_list)) {
foreach ($this->_list as $key => $list) {
if ($list['carrier_name'] == '0') {
$this->_list[$key]['carrier_name'] = Carrier::getCarrierNameFromShopName();
}
}
}
}
示例3: getList
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
if ($this->_list && is_array($this->_list)) {
foreach ($this->_list as $key => $list) {
if ($list['carrier_name'] == '0') {
$this->_list[$key]['carrier_name'] = Configuration::get('PS_SHOP_NAME');
}
}
}
}
示例4: getList
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
if (isset($this->_virtual_item_list) && !empty($this->_virtual_item_list)) {
foreach ($this->_list as &$item) {
foreach ($this->_virtual_item_list as $key) {
$item[$key] = '';
}
}
}
}
示例5: getList
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
foreach ($this->_list as $k => $list) {
if ($list['reduction_type'] == 'amount') {
$this->_list[$k]['reduction_type'] = $this->list_reduction_type['amount'];
} elseif ($list['reduction_type'] == 'percentage') {
$this->_list[$k]['reduction_type'] = $this->list_reduction_type['percentage'];
}
}
}
示例6: getList
public function getList($id_lang, $orderBy = null, $orderWay = null, $start = 0, $limit = null, $id_lang_shop = null)
{
parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, 0);
if (!empty($this->_list)) {
$nb = count($this->_list);
for ($i = 0; $i < $nb; $i++) {
if (Configuration::get('APH_PROFILE_STORE_EMPLOYEE') == $this->_list[$i]['id_profile']) {
$this->_list[$i]['email'] = '-';
}
}
}
}
示例7: getList
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
$shop_group_delete_list = array();
// test store authorized to remove
foreach ($this->_list as $shop_group) {
$shops = Shop::getShops(true, $shop_group['id_shop_group']);
if (!empty($shops)) {
$shop_group_delete_list[] = $shop_group['id_shop_group'];
}
}
$this->addRowActionSkipList('delete', $shop_group_delete_list);
}
示例8: getList
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
foreach ($this->_list as $k => $list) {
$currency = $this->cldr->getCurrency($this->_list[$k]['currency_iso_code']);
$this->_list[$k]['currency_name'] = ucfirst($currency['name']);
if ($list['reduction_type'] == 'amount') {
$this->_list[$k]['reduction_type'] = $this->list_reduction_type['amount'];
} elseif ($list['reduction_type'] == 'percentage') {
$this->_list[$k]['reduction_type'] = $this->list_reduction_type['percentage'];
}
}
}
示例9: getList
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList((int) $id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
if (count($this->_list)) {
$this->product_attachements = Attachment::getProductAttached((int) $id_lang, $this->_list);
$list_product_list = array();
foreach ($this->_list as $list) {
$product_list = '';
if (isset($this->product_attachements[$list['id_attachment']])) {
foreach ($this->product_attachements[$list['id_attachment']] as $product) {
$product_list .= $product . ', ';
}
}
$list_product_list[$list['id_attachment']] = $product_list;
}
// Assign array in list_action_delete.tpl
$this->tpl_delete_link_vars = array('product_list' => $list_product_list, 'product_attachements' => $this->product_attachements);
}
}
示例10: getList
/**
* Modifying initial getList method to display position feature (drag and drop)
*/
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
if (Tools::isSubmit($this->table . 'Orderby') || Tools::isSubmit($this->table . 'Orderway')) {
$this->filter = true;
}
if ($order_by && $this->context->cookie->__get($this->table . 'Orderby')) {
$order_by = $this->context->cookie->__get($this->table . 'Orderby');
} else {
$order_by = 'position';
}
if (is_null($order_way)) {
$order_way = Tools::getValue($this->table . 'Orderway', 'ASC');
}
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
}
示例11: getList
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
if (Shop::getContext() == Shop::CONTEXT_GROUP) {
$this->_where .= ' AND a.id_shop_group = ' . (int) Shop::getContextShopGroupID();
}
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
$shop_delete_list = array();
// don't allow to remove shop which have dependencies (customers / orders / ... )
foreach ($this->_list as &$shop) {
if (Shop::hasDependency($shop['id_shop'])) {
$shop_delete_list[] = $shop['id_shop'];
}
}
$this->context->smarty->assign('shops_having_dependencies', $shop_delete_list);
}
示例12: getList
/**
* AdminController::getList() override
* @see AdminController::getList()
*
* @param int $id_lang
* @param string|null $order_by
* @param string|null $order_way
* @param int $start
* @param int|null $limit
* @param int|bool $id_lang_shop
*
* @throws PrestaShopException
*/
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
// foreach item in the list to render
$nb_items = count($this->_list);
for ($i = 0; $i < $nb_items; ++$i) {
// depending on the management type, translates the management type
$item =& $this->_list[$i];
switch ($item['management_type']) {
// management type can be either WA/FIFO/LIFO
case 'WA':
$item['management_type'] = $this->l('WA: Weighted Average');
break;
case 'FIFO':
$item['management_type'] = $this->l('FIFO: First In, First Out');
break;
case 'LIFO':
$item['management_type'] = $this->l('LIFO: Last In, First Out');
break;
}
}
}
示例13: getList
/**
* AdminController::getList() override
* @see AdminController::getList()
*/
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
if ($this->ajax) {
foreach ($this->_list as &$list) {
if (file_exists(_PS_IMG_DIR_ . $this->fieldImageSettings['dir'] . '/' . (int) $list['id_attribute'] . '.jpg')) {
if (!isset($list['color']) || !is_array($list['color'])) {
$list['color'] = array();
}
$list['color']['texture'] = '../img/' . $this->fieldImageSettings['dir'] . '/' . (int) $list['id_attribute'] . '.jpg';
}
}
} else {
$nb_items = count($this->_list);
for ($i = 0; $i < $nb_items; ++$i) {
$item =& $this->_list[$i];
$query = new DbQuery();
$query->select('COUNT(a.id_attribute) as count_values');
$query->from('attribute', 'a');
$query->join(Shop::addSqlAssociation('attribute', 'a'));
$query->where('a.id_attribute_group =' . (int) $item['id_attribute_group']);
$query->groupBy('attribute_shop.id_shop');
$query->orderBy('count_values DESC');
$item['count_values'] = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
unset($query);
}
}
}
示例14: getList
public function getList($id_lang, $orderBy = null, $orderWay = null, $start = 0, $limit = null, $id_lang_shop = null)
{
parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, 0);
$currency = $this->context->currency;
if (!empty($this->_list)) {
$nb = count($this->_list);
for ($i = 0; $i < $nb; $i++) {
//$image = new AphOfferImage((int)$this->_list[$i]['id_image']);
//$this->_list[$i]['image'] = AphOfferImage::getImgFolderStatic((int)$this->_list[$i]['id_image']).$this->_list[$i]['id_image'].'.jpg';
$this->_list[$i]['available'] = 'Dal ' . Tools::displayDate($this->_list[$i]['available_from_date'], (int) Context::getContext()->language->id, false) . ' al ' . Tools::displayDate($this->_list[$i]['available_to_date'], (int) Context::getContext()->language->id, false);
$this->_list[$i]['visible'] = 'Dal ' . Tools::displayDate($this->_list[$i]['visible_from_date'], (int) Context::getContext()->language->id, false) . ' al ' . Tools::displayDate($this->_list[$i]['visible_to_date'], (int) Context::getContext()->language->id, false);
$this->_list[$i]['new_price'] = $this->_list[$i]['price_wt'] < 0 ? $this->_list[$i]['reduction_type'] == 'percentage' ? '-' . intval(round($this->_list[$i]['reduction'])) . '%' : '-' . Tools::displayPrice($this->_list[$i]['reduction'], (int) Context::getContext()->currency->id) : Tools::displayPrice($this->_list[$i]['price_wt'], (int) Context::getContext()->currency->id) . ' ';
}
}
}
示例15: getList
/**
* AdminController::getList() override
* @see AdminController::getList()
*/
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
$nb_items = count($this->_list);
for ($i = 0; $i < $nb_items; ++$i) {
if (isset($this->_list[$i]['messages'])) {
$this->_list[$i]['messages'] = Tools::htmlentitiesDecodeUTF8($this->_list[$i]['messages']);
}
}
}