Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

Make generateCategoriesMenu() a public function rather than protected#40

Open
drzraf wants to merge 2 commits into
PrestaShop:devfrom
drzraf:public-func
Open

Make generateCategoriesMenu() a public function rather than protected#40
drzraf wants to merge 2 commits into
PrestaShop:devfrom
drzraf:public-func

Conversation

@drzraf
Copy link
Copy Markdown

@drzraf drzraf commented Aug 18, 2015

Since it's useful because someone (other module, theme, ...) could use it to display
a custom category tree starting at a given level and benefit from the presentation,
consistency and work already done here.

Eg:

require_once("modules/blocktopmenu/blocktopmenu.php");
$cat = Category::getNestedCategories($root, 1, false, 1);
$b = new Blocktopmenu();
echo ($b->generateCategoriesMenu($cat));

Raphaël Droz added 2 commits August 18, 2015 09:54
Since it's useful because someone (other module, theme, ...) could use it to display
a custom category tree starting at a given level and benefit from the presentation,
consistency and work already done here.

Eg:
> require_once("modules/blocktopmenu/blocktopmenu.php");
> $cat = Category::getNestedCategories($root, 1, false, 1);
> $b = new Blocktopmenu();
> echo ($b->generateCategoriesMenu($cat));
For common tasks of menu generation through UI and tools, disabled categories
are ignored. But a custom theme could intentionally use the function to display
one or more disabled categories/categorie trees.
@drzraf
Copy link
Copy Markdown
Author

drzraf commented Aug 26, 2015

ping?

@drzraf
Copy link
Copy Markdown
Author

drzraf commented Sep 6, 2015

ping?
It's a fully-backward compatible two-liners without any possible regression.

@drzraf
Copy link
Copy Markdown
Author

drzraf commented Apr 19, 2018

ping?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant