protected function FormModePermission::clearDataPermissions in Form Mode Control 8.2
Same name and namespace in other branches
- 8 src/FormModePermission.php \Drupal\form_mode_control\FormModePermission::clearDataPermissions()
Clear a piece of data from this module's settings.
Parameters
string $data: The parameter to clear.
File
- src/
FormModePermission.php, line 123
Class
- FormModePermission
- Provides dynamic permissions for the form_mode_control module.
Namespace
Drupal\form_mode_controlCode
protected function clearDataPermissions($data) {
foreach ($data as $id => $permission) {
if (!EntityFormDisplay::load($id)) {
\Drupal::configFactory()
->getEditable('form_mode_control.settings')
->clear($id);
}
}
}