function _rac_form_field_storage_config_edit_form_submit in Role Access Control 8.2
Same name and namespace in other branches
- 8 rac.module \_rac_form_field_storage_config_edit_form_submit()
Implements hook_submit().
On submission of the Field Storage Config form, save the state of rac for the filed to its Third Party Settings config.
1 string reference to '_rac_form_field_storage_config_edit_form_submit'
- rac_form_field_storage_config_edit_form_alter in ./
rac.module - Implements hook_form_FORM_ID_alter().
File
- ./
rac.module, line 373 - Module providing role access relations.
Code
function _rac_form_field_storage_config_edit_form_submit($form, FormStateInterface $form_state) {
// Get form object and field we are editing.
$form_obj = $form_state
->getFormObject();
$field_storage = $form_obj
->getEntity();
$field_storage
->setThirdPartySetting('rac', 'enabled', $form_state
->getValue("rac_enabled"))
->save();
}