function JobItemForm::htmlTagCount

Compare the HTML tags of source and translation.

Parameters

array $tags: array containing all the HTML tags.

1 call to JobItemForm::htmlTagCount()
JobItemForm::compareHTMLTags in src/Form/JobItemForm.php
Compare the HTML tags of source and translation.

File

src/Form/JobItemForm.php, line 684

Class

JobItemForm
Form controller for the job item edit forms.

Namespace

Drupal\tmgmt\Form

Code

function htmlTagCount($tags) {
  $counted_tags = array();
  foreach ($tags as $tag) {
    if (in_array($tag, array_keys($counted_tags))) {
      $counted_tags[$tag]++;
    }
    else {
      $counted_tags[$tag] = 1;
    }
  }
  return $counted_tags;
}