<?php

namespace KupShop\AdminBundle\AdminListMassEdit;

use Admin\Lists\ProductsVarLabelsValuesList;

/**
 * @property ProductsVarLabelsValuesList $listClass
 */
class ProductsVarLabelsValuesListMassEdit extends BaseListMassEdit
{
    protected function massSaveAllFields(): void
    {
        parent::massSaveAllFields();
        if ($id = getVal('ID')) {
            $extraWhere = " AND id_label = '{$id}'";
            $this->listClass->saveAllPositions('sort', 'sort ASC', $extraWhere);
        }
    }
}
