Skip to content

Commit 34a59b8

Browse files
authored
Merge pull request #28 from ASUWebPlatforms/asuis-685-local-search-opt-out
ASUIS-685 Add opt-out for local site search for special cases
2 parents 56e64c0 + 4852a23 commit 34a59b8

File tree

1 file changed

+5
-37
lines changed

1 file changed

+5
-37
lines changed

src/Plugin/Block/AsuBrandHeaderBlock.php

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ public function build() {
114114
$props['searchUrl'] = $search_config->get('asu_brand.asu_brand_search_url');
115115
$local_search_url = $search_config->get('asu_brand.asu_brand_local_search_url');
116116
$props['site'] = strlen($local_search_url) ? $local_search_url : \Drupal::request()->getHost();
117+
// "opt-out" for use by ASU CMS, Integrated Search or with special
118+
// dispensation.
119+
if ($props['site'] == "opt-out") {
120+
unset($props['site']);
121+
}
117122

118123
$block_output = [];
119124
// Markup containers where components will initialize.
@@ -580,40 +585,3 @@ protected function getPathImgFolder() {
580585
return $appPathFolder;
581586
}
582587
}
583-
584-
/* DEV NOTES
585-
586-
TODO Add Cookie Consent
587-
TODO Create improvement ticket for admin UI: Capture ideas
588-
- menu handling limits depth to 2 for us. Matches standard. Document in UI.
589-
- add menu configs column to menu list adming table showing link item settings
590-
- js not working without including jQuery, which is unused... drupalSettings or Drupal js libs' dependency maybe?
591-
592-
TODO add a test (see other asu_brand for example) - confirm:
593-
- enabled menu items show
594-
- disabled menu items don't show
595-
- menu items at lower levels don't show
596-
- menu features display
597-
- login link matches login status
598-
599-
Sample Props and navTree structures
600-
See Storybook Knobs:
601-
https://unity.web.asu.edu/@asu-design-system/components-library/index.html?path=/story/header--base
602-
603-
navTree array structure, rough reference
604-
href
605-
text
606-
type : one of icon (home)
607-
class TODO not implemented. Needed?
608-
selected
609-
buttons
610-
text
611-
href
612-
color
613-
items: (each array under is a column)
614-
href
615-
text
616-
type : one of heading, button
617-
classes TODO not implmented. Needed?
618-
619-
*/

0 commit comments

Comments
 (0)