get($params->get('parent', 'root')); if ($category != null) { $items = $category->getChildren(); if ($params->get('count', 0) > 0 && count($items) > $params->get('count', 0)) { $items = array_slice($items, 0, $params->get('count', 0)); } return $items; } } }