public function getSortingOptions(array $columns = []) : array
{
$sorting = [];
foreach ($columns as $column => $directions) {
foreach ($directions as $direction) {
$label = sprintf('product.options.order_by.%s.%s', Helper::snake($column), $direction);
$active = $this->isSortingActive($column, $direction);
$sorting[] = ['orderBy' => $column, 'orderDir' => $direction, 'label' => $label, 'active' => $active];
}
}
return $sorting;
}