source/Application/Controller/Admin/ArticleAccessoriesAjax.php
private function rebuildAccessoriesSortIndexes(ListModel $inputList): array
    {

        $counter = 0;
        $outputList = [];
        foreach ($inputList as $key => $value) {
            if (isset($value->oxaccessoire2article__oxsort)) {
                if ($value->oxaccessoire2article__oxsort->value != $counter) {
                    $value->oxaccessoire2article__oxsort = new Field($counter);
                    $value->save();
                }
            }
            $outputList[$counter] = $key;
            $counter++;
        }

        return $outputList;
    }
private function rebuildAccessoriesSortIndexes(ListModel $inputList): array
    {

        $counter = 0;
        $outputList = [];
        foreach ($inputList as $key => $value) {
            if (isset($value->oxaccessoire2article__oxsort)) {
                if ($value->oxaccessoire2article__oxsort->value != $counter) {
                    $value->oxaccessoire2article__oxsort = new Field($counter);
                    $value->save();
                }
            }
            $outputList[$counter] = $key;
            $counter++;
        }

        return $outputList;
    }
private function rebuildAccessoriesSortIndexes ( ListModel $ inputList ) : array { $ counter = 0 ; $ outputList = [ ] ; foreach ( $ inputList as $ key => $ value ) { if ( isset ( $ value -> oxaccessoire2article__oxsort ) ) { if ( $ value -> oxaccessoire2article__oxsort -> value != $ counter ) { $ value -> oxaccessoire2article__oxsort = new Field ( $ counter ) ; $ value -> save ( ) ; } } $ outputList [ $ counter ] = $ key ; $ counter ++ ; } return $ outputList ; }
rebuild Accessories sort indexes

@param ListModel $inputList

@return array
rebuild Accessories sort indexes