You are here

protected function ContentLockSettingsForm::removeEmptyValue in Content locking (anti-concurrent editing) 8

Same name and namespace in other branches
  1. 8.2 src/Form/ContentLockSettingsForm.php \Drupal\content_lock\Form\ContentLockSettingsForm::removeEmptyValue()

Helper function to filter empty value in an array.

Parameters

array $array: The array to check for empty values.

Return value

array The array without empty values.

1 call to ContentLockSettingsForm::removeEmptyValue()
ContentLockSettingsForm::submitForm in src/Form/ContentLockSettingsForm.php
Form submission handler.

File

src/Form/ContentLockSettingsForm.php, line 280

Class

ContentLockSettingsForm
Class ContentLockSettingsForm.

Namespace

Drupal\content_lock\Form

Code

protected function removeEmptyValue(array $array) {
  return array_filter($array, function ($value) {
    return !empty($value);
  });
}