public static function WeMegaMenuBuilder::getMegamenuSubIds in Drupal Mega Menu 8
Same name and namespace in other branches
- 8.x src/WeMegaMenuBuilder.php \Drupal\we_megamenu\WeMegaMenuBuilder::getMegamenuSubIds()
1 call to WeMegaMenuBuilder::getMegamenuSubIds()
File
- src/
WeMegaMenuBuilder.php, line 771
Class
Namespace
Drupal\we_megamenuCode
public static function getMegamenuSubIds($item) {
$ids = [];
foreach ($item['rows_content'] as $i => $cols) {
foreach ($cols as $j => $col) {
$col_content = isset($col['col_content']) ? $col['col_content'] : [];
foreach ($col_content as $k => $sub_item) {
if ($sub_item['type'] == 'we-mega-menu-li') {
$ids[] = $sub_item['mlid'];
}
}
}
}
return $ids;
}