Model/Converter/ScopeConverter.php
private function getEntityStore($scope)
    {
        if (isset($this->entityStore[$scope])) {
            return $this->entityStore[$scope];
        }

        switch ($scope) {
            case self::SCOPE_STORES:
                $this->entityStore[$scope] = $this->storeManager->getStores(true, true);
                break;

            case self::SCOPE_WEBSITES:
                $this->entityStore[$scope] = $this->storeManager->getWebsites(true, true);
                break;

            default:
                throw new ScopeConvertException(sprintf('Unknown scope "%s"', $scope));
        }

        return $this->entityStore[$scope];
    }
private function getEntityStore($scope)
    {
        if (isset($this->entityStore[$scope])) {
            return $this->entityStore[$scope];
        }

        switch ($scope) {
            case self::SCOPE_STORES:
                $this->entityStore[$scope] = $this->storeManager->getStores(true, true);
                break;

            case self::SCOPE_WEBSITES:
                $this->entityStore[$scope] = $this->storeManager->getWebsites(true, true);
                break;

            default:
                throw new ScopeConvertException(sprintf('Unknown scope "%s"', $scope));
        }

        return $this->entityStore[$scope];
    }
private function getEntityStore ( $ scope ) { if ( isset ( $ this -> entityStore [ $ scope ] ) ) { return $ this -> entityStore [ $ scope ] ; } switch ( $ scope ) { case self :: SCOPE_STORES : $ this -> entityStore [ $ scope ] = $ this -> storeManager -> getStores ( true , true ) ; break ; case self :: SCOPE_WEBSITES : $ this -> entityStore [ $ scope ] = $ this -> storeManager -> getWebsites ( true , true ) ; break ; default : throw new ScopeConvertException ( sprintf ( 'Unknown scope "%s"' , $ scope ) ) ; } return $ this -> entityStore [ $ scope ] ; }
Retrieve the entities for the given scope

@param  string $scope Scope
@return \Magento\Store\Api\Data\WebsiteInterface[]|\Magento\Store\Api\Data\StoreInterface[]
Retrieve the entities for the given scope