EventListener/CustomerCustomerGroup.php
public function addCustomer(AddCustomerToCustomerGroupEvent $event)
    {
        (new CustomerCustomerGroupQuery())
            ->filterByCustomerId($event->getCustomerId())
            ->filterByCustomerGroupId($event->getCustomerGroupId())
            ->findOneOrCreate()
            ->save();
    }
public function addCustomer(AddCustomerToCustomerGroupEvent $event)
    {
        (new CustomerCustomerGroupQuery())
            ->filterByCustomerId($event->getCustomerId())
            ->filterByCustomerGroupId($event->getCustomerGroupId())
            ->findOneOrCreate()
            ->save();
    }
public function addCustomer ( AddCustomerToCustomerGroupEvent $ event ) { ( new CustomerCustomerGroupQuery ( ) ) -> filterByCustomerId ( $ event -> getCustomerId ( ) ) -> filterByCustomerGroupId ( $ event -> getCustomerGroupId ( ) ) -> findOneOrCreate ( ) -> save ( ) ; }
Add a customer to a customer group.
@param AddCustomerToCustomerGroupEvent $event
Add a customer to a customer group .