public function getCustomerGroups()
    {
        $groups = [];

        /** @var GroupInterface $customerGroup */
        foreach ($this->customerGroupCollection->getItems() as $customerGroup) {
            $group               = [];
            $group['id']         = $customerGroup->getId();
            $group['name']       = $customerGroup->getCode();
            $group['is_default'] = intval($customerGroup->getId() == GroupInterface::NOT_LOGGED_IN_ID);

            $matchingTaxClasses =
                $this->taxCollection->getItemsByColumnValue('class_id', $customerGroup->getTaxClassId());

            if (count($matchingTaxClasses)) {
                $group['customer_tax_class_key'] = array_pop($matchingTaxClasses)->getClassName();
            }

            $groups[] = $group;
        }

        return $groups;
    }
public function getCustomerGroups()
    {
        $groups = [];

        /** @var GroupInterface $customerGroup */
        foreach ($this->customerGroupCollection->getItems() as $customerGroup) {
            $group               = [];
            $group['id']         = $customerGroup->getId();
            $group['name']       = $customerGroup->getCode();
            $group['is_default'] = intval($customerGroup->getId() == GroupInterface::NOT_LOGGED_IN_ID);

            $matchingTaxClasses =
                $this->taxCollection->getItemsByColumnValue('class_id', $customerGroup->getTaxClassId());

            if (count($matchingTaxClasses)) {
                $group['customer_tax_class_key'] = array_pop($matchingTaxClasses)->getClassName();
            }

            $groups[] = $group;
        }

        return $groups;
    }
public function getCustomerGroups ( ) { $ groups = [ ] ; /** @var GroupInterface $customerGroup */ foreach ( $ this -> customerGroupCollection -> getItems ( ) as $ customerGroup ) { $ group = [ ] ; $ group [ 'id' ] = $ customerGroup -> getId ( ) ; $ group [ 'name' ] = $ customerGroup -> getCode ( ) ; $ group [ 'is_default' ] = intval ( $ customerGroup -> getId ( ) == GroupInterface :: NOT_LOGGED_IN_ID ) ; $ matchingTaxClasses = $ this -> taxCollection -> getItemsByColumnValue ( 'class_id' , $ customerGroup -> getTaxClassId ( ) ) ; if ( count ( $ matchingTaxClasses ) ) { $ group [ 'customer_tax_class_key' ] = array_pop ( $ matchingTaxClasses ) -> getClassName ( ) ; } $ groups [ ] = $ group ; } return $ groups ; }
Retrieves Customer Group data

@return array
Retrieves Customer Group data