Loading .circleci/config.yml +1 −1 Original line number Diff line number Diff line version: 2.1 orbs: ci-tools: kanopi/ci-tools@1.4.8 ci-tools: kanopi/ci-tools@2 workflows: phpcs-drupal: Loading README.md +17 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,23 @@ CONFIGURATION `entity.node.canonical` `- bundle:how_to` - *Taxonomy vocabulary overview form* `entity.taxonomy_vocabulary.overview_form` - *Specific Taxonomy vocabulary overview form* `entity.taxonomy_vocabulary.overview_form` `- bundle:tags` - *Specific Taxonomy term add/edit forms (Recommended to do both)* `entity.taxonomy_term.add_form` `- bundle:tags` `entity.taxonomy_term.edit_form` `- bundle:tags` - *Taxonomy terms of a specific vocabulary* `entity.taxonomy_term.canonical` `- bundle:tags` * Adding additional route parameters - The primary hook of this module, `tour_enhancements_page_bottom` in Loading tour_enhancements.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ description: Additional routes and functionality for Tours. package: tour core_version_requirement: ^8 || ^9 || ^10 dependencies: - tour - drupal:tour libraries-extend: tour/tour-styling: - tour_enhancements/tour_enhancements tour_enhancements.module +9 −1 Original line number Diff line number Diff line Loading @@ -31,9 +31,17 @@ function tour_enhancements_page_bottom(array &$page_bottom) { $params = $route_match->getRawParameters()->all(); // Include 'bundle' as parameter to use as match. // You could also add additional if (ie if a node had a specific field). if ($bundle = $route_match->getParameter('node')) { if ($params = $route_match->getParameter('node')) { $params['bundle'] = $route_match->getParameter('node')->bundle(); } // Get the Taxonomy Vocabulary. if ($params = $route_match->getParameter('taxonomy_vocabulary')) { $params['bundle'] = $route_match->getParameter('taxonomy_vocabulary')->id(); } // Get the Taxonomy Vocabulary from a term. if ($params = $route_match->getParameter('taxonomy_term')) { $params['bundle'] = $route_match->getParameter('taxonomy_term')->bundle(); } // Match on the parameters. if (!$tour->hasMatchingRoute($route_name, $params)) { unset($tours[$id]); Loading Loading
.circleci/config.yml +1 −1 Original line number Diff line number Diff line version: 2.1 orbs: ci-tools: kanopi/ci-tools@1.4.8 ci-tools: kanopi/ci-tools@2 workflows: phpcs-drupal: Loading
README.md +17 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,23 @@ CONFIGURATION `entity.node.canonical` `- bundle:how_to` - *Taxonomy vocabulary overview form* `entity.taxonomy_vocabulary.overview_form` - *Specific Taxonomy vocabulary overview form* `entity.taxonomy_vocabulary.overview_form` `- bundle:tags` - *Specific Taxonomy term add/edit forms (Recommended to do both)* `entity.taxonomy_term.add_form` `- bundle:tags` `entity.taxonomy_term.edit_form` `- bundle:tags` - *Taxonomy terms of a specific vocabulary* `entity.taxonomy_term.canonical` `- bundle:tags` * Adding additional route parameters - The primary hook of this module, `tour_enhancements_page_bottom` in Loading
tour_enhancements.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ description: Additional routes and functionality for Tours. package: tour core_version_requirement: ^8 || ^9 || ^10 dependencies: - tour - drupal:tour libraries-extend: tour/tour-styling: - tour_enhancements/tour_enhancements
tour_enhancements.module +9 −1 Original line number Diff line number Diff line Loading @@ -31,9 +31,17 @@ function tour_enhancements_page_bottom(array &$page_bottom) { $params = $route_match->getRawParameters()->all(); // Include 'bundle' as parameter to use as match. // You could also add additional if (ie if a node had a specific field). if ($bundle = $route_match->getParameter('node')) { if ($params = $route_match->getParameter('node')) { $params['bundle'] = $route_match->getParameter('node')->bundle(); } // Get the Taxonomy Vocabulary. if ($params = $route_match->getParameter('taxonomy_vocabulary')) { $params['bundle'] = $route_match->getParameter('taxonomy_vocabulary')->id(); } // Get the Taxonomy Vocabulary from a term. if ($params = $route_match->getParameter('taxonomy_term')) { $params['bundle'] = $route_match->getParameter('taxonomy_term')->bundle(); } // Match on the parameters. if (!$tour->hasMatchingRoute($route_name, $params)) { unset($tours[$id]); Loading