public function UpdateHelper::setKey in Evercurrent 8
Same name and namespace in other branches
- 8.2 src/UpdateHelper.php \Drupal\evercurrent\UpdateHelper::setKey()
Check a key and set it if valid.
Parameters
$key:
Return value
bool
File
- src/
UpdateHelper.php, line 235 - Contains Drupal\evercurrent\UpdateHelper.
Class
- UpdateHelper
- Class UpdateHelper.
Namespace
Drupal\evercurrentCode
public function setKey($key) {
$config = $this->config_factory
->getEditable('evercurrent.admin_config');
if ($this
->keyCheck($key)) {
$config
->set('key', $key);
return TRUE;
}
$this
->writeStatus(RMH_STATUS_ERROR, 'Failed to set RMH key. Key should be a 32-character string.');
return FALSE;
}