本文整理匯總了PHP中Magento\Store\Model\Store::resetConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::resetConfig方法的具體用法?PHP Store::resetConfig怎麽用?PHP Store::resetConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Store\Model\Store
的用法示例。
在下文中一共展示了Store::resetConfig方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: resetConfig
/**
* {@inheritdoc}
*/
public function resetConfig()
{
$pluginInfo = $this->pluginList->getNext($this->subjectType, 'resetConfig');
if (!$pluginInfo) {
return parent::resetConfig();
} else {
return $this->___callPlugins('resetConfig', func_get_args(), $pluginInfo);
}
}
示例2: deleteAccount
/**
* Removes an account with associated api tokens for the store.
*
* @param \NostoAccount $account the account to remove.
* @param Store $store the store.
*
* @return bool true on success, false otherwise.
*/
public function deleteAccount(\NostoAccount $account, Store $store)
{
if ((int) $store->getId() < 1) {
return false;
}
$this->_config->delete(self::XML_PATH_ACCOUNT, ScopeInterface::SCOPE_STORES, $store->getId());
$this->_config->delete(self::XML_PATH_TOKENS, ScopeInterface::SCOPE_STORES, $store->getId());
try {
// Notify Nosto that the account was deleted.
$service = new \NostoServiceAccount();
$service->delete($account);
} catch (\NostoException $e) {
// Failures are logged but not shown to the user.
$this->_logger->error($e, ['exception' => $e]);
}
$store->resetConfig();
return true;
}