本文整理匯總了PHP中UserSettings::setKey方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserSettings::setKey方法的具體用法?PHP UserSettings::setKey怎麽用?PHP UserSettings::setKey使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserSettings
的用法示例。
在下文中一共展示了UserSettings::setKey方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: executesetcountry
public function executesetcountry($eventData)
{
$userCfg = new UserSettings(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserId());
$userCfg->setKey('desktop-country', $eventData['country']);
$domainSettings = new DomainSettings(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess());
if (User::isAdminUser(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserName(), \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDomainId())) {
$domainSettings->EditKey('desktop-country', $eventData['country']);
}
$this->status = $this->localeCatalog->getStr('countryset_status');
$this->setChanged();
$this->notifyObservers('status');
$this->notifyObservers('javascript');
}