You are here

private function GConfigForm::entryMatch in Jammer 1.0.x

1 call to GConfigForm::entryMatch()
GConfigForm::submitForm in src/Form/GConfigForm.php
Form submission handler.

File

src/Form/GConfigForm.php, line 22

Class

GConfigForm

Namespace

Drupal\jammer\Form

Code

private function entryMatch($entry, $data) {
  foreach ($data as $line) {
    if ($line['form'] != $entry['form']) {
      continue;

      // skip, not the same form
    }
    foreach ($line['elements'] as $el) {
      if (in_array($el, $entry['elements'])) {
        return TRUE;

        // at least one match
      }
    }
  }

  // no match
  return FALSE;
}