getListArray example

$this->View()->assign('userInfo', $this->get('shopware_account.store_front_greeting_service')->fetch());
        $this->View()->assign('sUserData', $this->admin->sGetUserData());
        $this->View()->assign('sAction', $this->Request()->getActionName());
    }

    /** * Address listing */
    public function indexAction()
    {
        $addresses = $this->addressRepository->getListArray(
            $this->container->get('session')->get('sUserId')
        );

        // Create a list of ids of occurring countries and states         $countryIds = array_unique(array_filter(array_column($addresses, 'countryId')));
        $stateIds = array_unique(array_filter(array_column($addresses, 'stateId')));

        $countryRepository = $this->container->get(CountryGatewayInterface::class);
        $context = $this->container->get(ContextServiceInterface::class)->getShopContext();

        $countries = $countryRepository->getCountries($countryIds$context);
        
Home | Imprint | This part of the site doesn't use cookies.