Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
WebsiteManagement.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Store\Model;
7 
9 use Magento\Store\Model\ResourceModel\Website\CollectionFactory;
10 
16 {
20  protected $websitesFactory;
21 
25  public function __construct(CollectionFactory $websitesFactory)
26  {
27  $this->websitesFactory = $websitesFactory;
28  }
29 
33  public function getCount()
34  {
35  $websites = $this->websitesFactory->create();
37  return $websites->getSize();
38  }
39 }
__construct(CollectionFactory $websitesFactory)