Public Member Functions | |
convertStoreToWebsite ($table) | |
Protected Member Functions | |
_getStoreToWebsiteAssignments () | |
_setWebsiteInfo ($table, $websiteId, $storeIds) | |
Protected Attributes | |
$_storeToWebsite = null |
Definition at line 21 of file Setup.php.
_getStoreToWebsiteAssignments | ( | ) | [protected] |
Definition at line 34 of file Setup.php.
00035 { 00036 if (is_null($this->_storeToWebsite)) { 00037 $this->_storeToWebsite = array(); 00038 $websiteCollection = Mage::getModel('core/website')->getCollection(); 00039 foreach ($websiteCollection as $website) { 00040 $this->_storeToWebsite[$website->getId()] = $website->getStoreIds(); 00041 } 00042 } 00043 00044 return $this->_storeToWebsite; 00045 }
_setWebsiteInfo | ( | $ | table, | |
$ | websiteId, | |||
$ | storeIds | |||
) | [protected] |
Definition at line 47 of file Setup.php.
00048 { 00049 $this->getConnection()->update( 00050 $table, 00051 array('website_id'=>$websiteId), 00052 $this->getConnection()->quoteInto('store_id IN (?)', $storeIds) 00053 ); 00054 00055 return $this; 00056 }
convertStoreToWebsite | ( | $ | table | ) |
Definition at line 25 of file Setup.php.
00026 { 00027 $assignment = $this->_getStoreToWebsiteAssignments(); 00028 foreach ($assignment as $website=>$stores) { 00029 $this->_setWebsiteInfo($table, $website, $stores); 00030 } 00031 return $this; 00032 }