public function CustomValueVariable::getSettingsForm in Business Rules 8
Same name and namespace in other branches
- 2.x src/Plugin/BusinessRulesVariable/CustomValueVariable.php \Drupal\business_rules\Plugin\BusinessRulesVariable\CustomValueVariable::getSettingsForm()
Return the form array.
@internal param array $form
Parameters
array $form: The form array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state object.
\Drupal\business_rules\ItemInterface $item: The configured item.
Return value
array The render array for the settings form.
Overrides BusinessRulesItemPluginBase::getSettingsForm
File
- src/
Plugin/ BusinessRulesVariable/ CustomValueVariable.php, line 37
Class
- CustomValueVariable
- Class ConstantVariable.
Namespace
Drupal\business_rules\Plugin\BusinessRulesVariableCode
public function getSettingsForm(array &$form, FormStateInterface $form_state, ItemInterface $item) {
$settings['value'] = [
'#type' => 'textarea',
'#title' => t('Custom value'),
'#description' => t("The initial value for this variable. You can change this value through actions."),
'#required' => FALSE,
'#default_value' => $item
->getSettings('value'),
];
return $settings;
}