Commit 71ff8264 authored by Nicolas Widart's avatar Nicolas Widart

Rename method for clarity

parent 039a9e7f
...@@ -31,7 +31,7 @@ class MenuRenderer ...@@ -31,7 +31,7 @@ class MenuRenderer
$this->menuId = $menuId; $this->menuId = $menuId;
$this->menu .= $this->startTag; $this->menu .= $this->startTag;
$this->renderItems($menuItems); $this->generateHtmlFor($menuItems);
$this->menu .= $this->endTag; $this->menu .= $this->endTag;
return $this->menu; return $this->menu;
...@@ -41,7 +41,7 @@ class MenuRenderer ...@@ -41,7 +41,7 @@ class MenuRenderer
* Generate the html for the given items * Generate the html for the given items
* @param $items * @param $items
*/ */
private function renderItems($items) private function generateHtmlFor($items)
{ {
$this->menu .= '<ol class="dd-list">'; $this->menu .= '<ol class="dd-list">';
foreach ($items as $item) { foreach ($items as $item) {
...@@ -53,7 +53,7 @@ class MenuRenderer ...@@ -53,7 +53,7 @@ class MenuRenderer
$this->menu .= "<div class=\"dd-handle\">{$item->title}</div>"; $this->menu .= "<div class=\"dd-handle\">{$item->title}</div>";
if (!$item->children()->get()->isEmpty()) { if (!$item->children()->get()->isEmpty()) {
$this->renderItems($item->children()->get()); $this->generateHtmlFor($item->children()->get());
} }
$this->menu .= '</li>'; $this->menu .= '</li>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment