Bolt\Storage\Field\Type\TaxonomyType::getGroup PHP Метод

getGroup() защищенный Метод

protected getGroup ( Taxonomy $taxonomy )
$taxonomy Bolt\Storage\Collection\Taxonomy
    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;
    }