src/Repositories/CustomerGroupRepository.php
/**
     * Returns an array with the available customer groups and their code as keys.
     *
     * @return array The array with the customer groups
     */
Returns an array with the available customer groups and their code as keys.
@return array The array with the customer groups
Returns an array with the available customer groups and their code as keys . @return array The array with the customer groups
public function findAll()
    {
        $customerGroups = [];
        $this->customerGroupsStmt->execute();
        $availableCustomerGroups = $this->customerGroupsStmt->fetchAll();
        foreach ($availableCustomerGroups as $customerGroup) {
            $customerGroups[$customerGroup[MemberNames::CUSTOMER_GROUP_CODE]] = $customerGroup;
        }
        return $customerGroups;
    }
public function findAll ( ) { $ customerGroups = [ ] ; $ this -> customerGroupsStmt -> execute ( ) ; $ availableCustomerGroups = $ this -> customerGroupsStmt -> fetchAll ( ) ; foreach ( $ availableCustomerGroups as $ customerGroup ) { $ customerGroups [ $ customerGroup [ MemberNames :: CUSTOMER_GROUP_CODE ] ] = $ customerGroup ; } return $ customerGroups ; }
Returns an array with the available customer groups and their code as keys.
Returns an array with the available customer groups and their code as keys .
// initialize the array for the customer groups // execute the prepared statement // load the available customer groups // fetch the customer groups and assemble them as array with the codes as key // return the customer groups