protected function getGroup(Collection\Taxonomy $taxonomy)
{
$group = null;
$taxData = $this->mapping['data'];
foreach ($taxonomy as $tax) {
if ($taxData['has_sortorder']) {
// Previously we only cared about the last oneā¦ so yeah
$needle = $tax->getSlug();
$index = array_search($needle, array_keys($taxData['options']));
$group = ['slug' => $tax->getSlug(), 'name' => $tax->getName(), 'order' => $tax->getSortorder(), 'index' => $index ?: 2147483647];
}
}
return $group;
}