protected function PushBase::getFormValue in Open Social 8.7
Same name and namespace in other branches
- 8.9 modules/custom/activity_send/modules/activity_send_push_notification/src/PushBase.php \Drupal\activity_send_push_notification\PushBase::getFormValue()
- 8.8 modules/custom/activity_send/modules/activity_send_push_notification/src/PushBase.php \Drupal\activity_send_push_notification\PushBase::getFormValue()
- 10.3.x modules/custom/activity_send/modules/activity_send_push_notification/src/PushBase.php \Drupal\activity_send_push_notification\PushBase::getFormValue()
- 10.0.x modules/custom/activity_send/modules/activity_send_push_notification/src/PushBase.php \Drupal\activity_send_push_notification\PushBase::getFormValue()
- 10.1.x modules/custom/activity_send/modules/activity_send_push_notification/src/PushBase.php \Drupal\activity_send_push_notification\PushBase::getFormValue()
- 10.2.x modules/custom/activity_send/modules/activity_send_push_notification/src/PushBase.php \Drupal\activity_send_push_notification\PushBase::getFormValue()
Returns the submitted form value for a specific key.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
string|array $key: Values are stored as a multi-dimensional associative array. If $key is a string, it will return $values[$key]. If $key is an array, each element of the array will be used as a nested key. If $key = array('foo', 'bar') it will return $values['foo']['bar'].
mixed $default: (optional) The default value if the specified key does not exist.
Return value
mixed The value for the given key, or NULL.
File
- modules/
custom/ activity_send/ modules/ activity_send_push_notification/ src/ PushBase.php, line 122
Class
- PushBase
- Class PushBase.
Namespace
Drupal\activity_send_push_notificationCode
protected function getFormValue(FormStateInterface $form_state, $key, $default = NULL) {
if (!is_array($key)) {
$key = [
$key,
];
}
$key = array_merge([
'push_notifications',
$this
->getPluginId(),
], $key);
return $form_state
->getValue($key, $default);
}