Renders a menu for the page node structure If you would like to edit this, it would be much wiser to sub-class it and override the various methods
This is the code documentation for the SproutCMS project
Search documentation |
class NavigationMenuRenders a menu for the page node structure If you would like to edit this, it would be much wiser to sub-class it and override the various methods
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2025-10-31
**/
class NewClassName extends NavigationMenu {
/**
* Return HTML for a drop-down sub menu
**/
protected function subMenu (Treenode $parent_node, array $groups, Treenode $selected_node, array $selected_ancestors) {
// Method code goes here
}
/**
* Determine the classes for the LI for a navigation item
**/
public function determineClasses (Treenode $node, int $depth, int $index, Treenode $selected_node, array $selected_ancestors, bool $has_children) {
// Method code goes here
}
/**
* Return HTML for the home page nav item
* This would typically be a LI
**/
protected function home () {
// Method code goes here
}
/**
* Return HTML for a mega menu.
*
* You shouldn't need to modify or extend this method;
* If you do then your use case is probably too bespoke for this class.
**/
public function render () {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |
|