You are here

protected function WebhookConfigForm::isEmptyList in Webhooks 8

Identifies if an array of form values is empty.

FormState::isValueEmpty() does not handle tableselect or #tree submissions.

Parameters

array $list: Array of key value pairs. keys are identifiers, values are 0 if empty or the same value as the key if checked on.

Return value

bool TRUE if empty, FALSE otherwise.

1 call to WebhookConfigForm::isEmptyList()
WebhookConfigForm::validateForm in src/Form/WebhookConfigForm.php
Form validation handler.

File

src/Form/WebhookConfigForm.php, line 363

Class

WebhookConfigForm
Class Webhook Config Form.

Namespace

Drupal\webhooks\Form

Code

protected function isEmptyList(array $list) {
  return count(array_filter($list)) == 0;
}