We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8df579b commit 4b9a678Copy full SHA for 4b9a678
1 file changed
public/modules/custom/asu_apartment_search/asu_apartment_search.module
@@ -5,6 +5,7 @@
5
* Contains asu apartment search module.
6
*/
7
8
+use Drupal\menu_link_content\Entity\MenuLinkContent;
9
/**
10
* Implements hook_theme().
11
@@ -31,3 +32,19 @@ function asu_apartment_search_theme() {
31
32
],
33
];
34
}
35
+
36
37
+function asu_apartment_search_entity_load(array &$entities, string $entity_type) {
38
+ if ($entity_type === 'menu_link_content') {
39
+ foreach ($entities as $entity) {
40
+ $disabled_routes = [
41
+ 'route:asu_apartment_search.haso_upcoming',
42
+ 'route:asu_apartment_search.hitas_upcoming',
43
+ ];
44
45
+ if (in_array($entity->get('link')->uri, $disabled_routes)) {
46
+ $entity->delete();
47
+ }
48
49
50
+}
0 commit comments