protected function initWebsites($withDefault = false)
    {
        /** @var $website \Magento\Store\Model\Website */
        foreach ($this->storeManager->getWebsites($withDefault) as $website) {
            $this->websiteCodeToId[$website->getCode()] = $website->getId();
        }
        return $this;
    }
protected function initWebsites($withDefault = false)
    {
        /** @var $website \Magento\Store\Model\Website */
        foreach ($this->storeManager->getWebsites($withDefault) as $website) {
            $this->websiteCodeToId[$website->getCode()] = $website->getId();
        }
        return $this;
    }
protected function initWebsites ( $ withDefault = false ) { /** @var $website \Magento\Store\Model\Website */ foreach ( $ this -> storeManager -> getWebsites ( $ withDefault ) as $ website ) { $ this -> websiteCodeToId [ $ website -> getCode ( ) ] = $ website -> getId ( ) ; } return $ this ; }
Initialize website values.

@param bool $withDefault
@return $this
Initialize website values .