Creates a list

@param string $class UL class
@param array $children
@return string
975044
protected function renderList($class, array $children)
    {
        $ul = new NodeElement();
        $ul->openTag('ul')
           ->addAttribute('class', $class)
           ->finalize(true)
           ->appendChildren($children)
           ->closeTag();

        return $ul->render();
    }
90969
public static function buildMenuFromArray( $tree, $contentDrop = NULL )
	{
		$list	= array();
		foreach( $tree['children'] as $child )
			$list[]	= self::buildItemWithChildrenFromArray( $child, 1, $contentDrop );
		return UI_HTML_Elements::unorderedList( $list, 1 );
	}
1233405
public function getAllChildren(&$children = [])
    {
        if (!$this->allChildren && $this->getChildren()) {
            $page = $this;
            foreach ($page->getChildren() as $child) {
                $children[] = $child;
                if ($child->getChildren()) {
                    $child->getAllChildren($children);
                }
            }

            $this->setAllChildren(array_reverse($children));
        }

        return $this->allChildren;
    }
246572
public function getFkList($member, $list) {
		$element = $this->jquery->semantic ()->htmlList ( "list-" . $member );
		$element->setMaxVisible ( 10 );
		return $element->addClass ( "animated" );
	}
163230
protected function getChildrenList() {
        $query = (new Query)->from($this->itemChildTable);
        $parents = [];
        foreach ($query->all($this->db) as $row) {
            $parents[$row['parent']][] = $row['child'];
        }
        return $parents;
    }
84458
public function getChildOfClass($class)
    {
        // Check for namespace alias
        if (strpos($class, ':') !== false) {
            list($namespaceAlias, $simpleClassName) = explode(':', $class);
            $class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        foreach ($this->getChildren() as $child) {
            if ($child->getPage() instanceof $class) {
                return $child;
            }
        }

        return null;
    }
164443
protected function buildList(array $items, string $marker, int $nestingLevel = 0, int $parentWidth = 0): string
	{
		$width  = $this->calculateWidth($items, $marker);
		$number = 0;
		$list   = '';

		foreach($items as $item)
		{
			if(is_array($item))
			{
				$list .= $this->buildList($item, $marker, ($nestingLevel + 1), ($width['marker'] - 1 + $parentWidth));
			}
			else
			{
				$list .= $this->buildListItem($item, $marker, $width['number'], ++$number, $nestingLevel, $parentWidth);
			}
		}

		return $list;
	}
1333515
protected function renderChildren(array $children = [], $force)
    {
        // The HTML result of children
        $html = '';

        // Iterate children and render HTML of each
        foreach ($children as $child) {
            $html .= $child->render($force)->get();
        }

        return $html;
    }
371431
public static function ul( $items, $options = [] ) {
		$tag         = ArrayHelper::remove( $options, 'tag', 'ul');
		$encode      = ArrayHelper::remove( $options, 'encode', FALSE );
		$formatter   = ArrayHelper::remove( $options, 'item');
		$separator   = ArrayHelper::remove( $options, 'separator', "\n");
		$itemOptions = ArrayHelper::remove( $options, 'itemOptions', []);
		$classFor    = ArrayHelper::remove( $itemOptions, 'class_for', null );

		if ( empty( $items ) ) {
			return static::tag( $tag, '', $options );
		}
		$results = [];
		foreach ( $items as $i => $item ) {
			if ( $formatter !== NULL ) {
				$results[] = call_user_func( $formatter, $item, $i );
			} else {
				$_itemOptions = $itemOptions;
				if ( isset( $classFor ) && array_key_exists( $i, $classFor ) ) {
					static::addCssClass( $_itemOptions, $classFor[ $i ] );
				}
				$results[] = static::tag('li', $encode ? static::encode( $item ) : $item, $_itemOptions );
			}
		}

		return static::tag( $tag, $separator . join( $separator, $results ) . $separator, $options );
	}
809196
public function wrapperClass($classes = [])
    {
        $classes = !is_array($classes) ? explode(' ', $classes) : $classes;
        $classes[] = 'wrapper';
        $classes[] = sprintf('template-%s', $this->template);

        if (is_active_sidebar(sprintf('sidebar-%s', $this->template))) {
            $classes[] = 'active-sidebar';
        }

        if (has_nav_menu('main-menu')) {
            $classes[] = 'active-main-menu';
        }

        if (is_active_sidebar('header-widgets')) {
            $classes[] = 'active-header-widgets';
        }

        $i = 0;
        if (is_active_sidebar('footer-one')) $i++;
        if (is_active_sidebar('footer-two')) $i++;
        if (is_active_sidebar('footer-three')) $i++;
        if (is_active_sidebar('footer-four')) $i++;

        switch ($i) {
            case 1:
                $classes[] = 'active-footers-one';
                break;
            case 2:
                $classes[] = 'active-footers-two';
                break;
            case 3:
                $classes[] = 'active-footers-three';
                break;
            case 4:
                $classes[] = 'active-footers-four';
                break;
            default:
                break;
        }

        $classes = apply_filters('novusopress_view_wrapper_classes', $classes);
        $output = sprintf('class="%s"', implode(' ', $classes));

        return apply_filters('novusopress_view_wrapper_class_output', $output);
    }
1060507
public function GroupedBy($index, $children = 'Children')
    {
        $grouped = $this->groupBy($index);
        $result  = new ArrayList();

        foreach ($grouped as $indVal => $list) {
            $list = GroupedList::create($list);
            $result->push(new ArrayData(array(
                $index    => $indVal,
                $children => $list
            )));
        }

        return $result;
    }
703436
public function makeChildrenTree($categories)
    {
        $tmp = [];
        foreach ($categories as $key => $category){
            if(!key_exists('children', $category)) {
                $category->children = [];
            }

            // get children
            $children = $this->getChildren($category->categoryID);

            // call self to get a loop until every category has his children
            $category->children = $this->makeChildrenTree($children);

            $tmp[] = $category;
        }

        return Language::filterRows($tmp, false);
    }
1300030
public function nl2list($class = '', $liClass = '', $tag = 'ul') {
        $val = trim($this->owner->XML(), "\n");

        $val = str_replace("\n", sprintf('</li><li%s>', $liClass ? 'class="' . $liClass . '"' : ''), $val);

        $val = $liClass ? '<li class="' . $liClass . '">' . $val . '</li>' : '<li>' . $val . '</li>';

        return $class ? '<' . $tag . ' class="' . $class . '">' . $val . '</' . $tag . '>' : '<' . $tag . '>' . $val . '</' . $tag . '>';
    }
591567
public function createList($list = null)
    {
        $node = new Item();

        if ($list instanceof Item) {
            $node = $list;
        } elseif ($list instanceof Element) {
            $node->entity->setEntityName($list->entity->getEntityName());

            if ($list instanceof Dropdown) {
                $list = clone $list;
                $node->attributes->addAttributeClass('dropdown');

                $list->toggle->tagName = 'a';
                $list->toggle->attributes->remove('type');
                $list->toggle->attributes->removeAttributeClass(['btn', 'btn-*']);
                $list->toggle->attributes->addAttribute('role', 'button');

                $node->childNodes->push($list->toggle);
                $node->childNodes->push($list->menu);
            } else {
                $node->childNodes->push($list);
            }

        } else {
            if (is_numeric($list)) {
                $node->entity->setEntityName('list-' . $list);
            } else {
                $node->entity->setEntityName($list);
            }
            $node->textContent->push($list);
        }

        $node->attributes->addAttributeClass('nav-item');
        $node->attributes->addAttribute('role', 'presentation');

        $this->pushChildNode($node);

        return $this->childNodes->last();
    }
517413
public function renderChildren($children = null)
    {
        if (null === $children) {
            $children = $this->getChildren();
        }

        if (!is_array($children)) {
            throw new Exception\InvalidArgumentException(
                'Invalid children type supplied. Expected array or null.'
            );
        }

        $content = '';

        /* @var $child HtmlElement */
        foreach ($children as $child) {
            $content .= $child->render();
        }

        return $content;
    }
546663
public function createBreadcrumb($class = 'breadcrumb', $itemClass = 'breadcrumb-item', $list = true) {
        $breadcrumb = (($list === true && $this->getBreadcrumbElement() !== false) ? '<'.$this->getBreadcrumbElement().(!empty(trim($class)) ? ' class="'.$class.'"' : '').'>' : '');
        if($this->navArray[0]['uri'] !== $this->links[0]['uri']){$breadcrumb.= (($list === true && $this->isBreadcrumbList() !== false) ? '<li'.(!empty(trim($itemClass)) ? Link::htmlClass($itemClass, '') : '').'>' : '').Link::formatLink($this->navArray[0], '', false, true).($list === true && $this->isBreadcrumbList() ? '</li>' : '');}
        $numlinks = (count($this->links) - 1);
        for($i = 0; $i <= $numlinks; $i++) {
            $breadcrumb.= ($list === true ? '<'.($this->isBreadcrumbList() ? 'li' : 'span').(!empty(trim($itemClass)) ? Link::htmlClass($itemClass, ($i === $numlinks ? $this->getActiveClass() : '')) : '').'>' : $this->getBreadcrumbSeparator())
            .($i === $numlinks ? Link::label($this->links[$i]) : Link::formatLink($this->links[$i], '', false, true))
            .($list === true ? '</'.($this->isBreadcrumbList() ? 'li' : 'span').'>' : '');
        }
        return $breadcrumb.(($list === true && $this->getBreadcrumbElement() !== false) ? '</'.$this->getBreadcrumbElement().'>' : '');
    }
134870
public function class($classes): Htmlable
    {
        if ($classes instanceof Collection) {
            $classes = $classes->toArray();
        }

        $attributes = new Attributes();
        $attributes->addClass($classes);

        return new HtmlString(
            $attributes->render()
        );
    }