public function BusinessRulesItemBase::setSetting in Business Rules 8
Same name and namespace in other branches
- 2.x src/Entity/BusinessRulesItemBase.php \Drupal\business_rules\Entity\BusinessRulesItemBase::setSetting()
Set a value to the Item Settings.
Parameters
string $settingId: The setting id.
mixed $value: The value to be set on Item settings.
Throws
\Exception
Overrides ItemInterface::setSetting
File
- src/
Entity/ BusinessRulesItemBase.php, line 170
Class
- BusinessRulesItemBase
- Class Item.
Namespace
Drupal\business_rules\EntityCode
public function setSetting($settingId, $value) {
if (!empty($settingId)) {
$this->settings[$settingId] = $value;
}
else {
throw new \Exception('You must enter a value to the settingId');
}
}