public function AddNodeToGroupAction::getSettingsForm in Business Rules 2.x
Same name and namespace in other branches
- 8 modules/br_group/src/Plugin/BusinessRulesAction/AddNodeToGroupAction.php \Drupal\br_group\Plugin\BusinessRulesAction\AddNodeToGroupAction::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
- modules/
br_group/ src/ Plugin/ BusinessRulesAction/ AddNodeToGroupAction.php, line 34
Class
- AddNodeToGroupAction
- Class AddNodeToGroupAction.
Namespace
Drupal\br_group\Plugin\BusinessRulesActionCode
public function getSettingsForm(array &$form, FormStateInterface $form_state, ItemInterface $item) {
$settings['node_id'] = [
'#type' => 'textfield',
'#title' => t('Node Id'),
'#required' => TRUE,
'#description' => t('The node id to be added to the group. You may use variable or token to fill this information'),
'#default_value' => $item
->getSettings('node_id'),
];
$settings['group_id'] = [
'#type' => 'textfield',
'#title' => t('Group Id'),
'#required' => TRUE,
'#description' => t('The group id to add the node. You may use variable or token to fill this information'),
'#default_value' => $item
->getSettings('group_id'),
];
return $settings;
}