Commit c43e104c authored by Nicolas Widart's avatar Nicolas Widart

Extract method

parent 71ff8264
......@@ -52,7 +52,7 @@ class MenuRenderer
Edit</a>';
$this->menu .= "<div class=\"dd-handle\">{$item->title}</div>";
if (!$item->children()->get()->isEmpty()) {
if ($this->hasChildren($item)) {
$this->generateHtmlFor($item->children()->get());
}
......@@ -60,4 +60,13 @@ class MenuRenderer
}
$this->menu .= '</ol>';
}
/**
* @param $item
* @return bool
*/
private function hasChildren($item)
{
return !$item->children()->get()->isEmpty();
}
}
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