You are here

public static function WeMegaMenuBuilder::equalArrays in Drupal Mega Menu 8

Same name and namespace in other branches
  1. 8.x src/WeMegaMenuBuilder.php \Drupal\we_megamenu\WeMegaMenuBuilder::equalArrays()
1 call to WeMegaMenuBuilder::equalArrays()
WeMegaMenuBuilder::compareItem in src/WeMegaMenuBuilder.php

File

src/WeMegaMenuBuilder.php, line 786

Class

WeMegaMenuBuilder

Namespace

Drupal\we_megamenu

Code

public static function equalArrays($array_1, $array_2) {
  if (count($array_1) != count($array_2)) {
    return FALSE;
  }
  for ($i = 0; $i < count($array_1); $i++) {
    if ($array_1[$i] != $array_2[$i]) {
      return FALSE;
    }
  }
  return TRUE;
}