I want to get the names(and the other info ofc.) of all the stores where I have the Magento2 Installation. I do the following:
use Magento\Store\Model\StoreFactory; ... $this->_storeFactory = $storeFactory->create(); .... $this->_storeFactory->getCollection()->toArray();
And I get the collection into the array. However, the problem is that in the ['name'] column of each item I don't have the name of the Store, but I get the name of the Store View. I've created 3 different stores with 4 Store views - one Store hase 2 Store views, the other 2 stores have only one store view, which makes total of 4, which is the number of the items in the collection. Why is this happening, aren't store and store view to completely different things? This is kind of confusing. How can I get information for a Store like
["store_id"]=> string(1) "The id of the store, not the id of the store view" ["code"]=> string(2) "The code of the store, not the Store view" ["website_id"]=> string(1) "The website Id that the store belongs to" ["group_id"]=> string(1) "1" ["name"]=> string(7) "The actual name of the store, not the name of the view"